I have a code and I need to modify my code. What I have to do is I need to send auto mail to suppliers and as well as officer.
I did my code as below. And I have a cursor named PaymtPo
Inside this code I need to do my modifications. Can anyone please help me to do this?
Thank you
I did my code as below. And I have a cursor named PaymtPo
Code:
sFrom = "AutoMail@star.lk"
IF ALLTRIM(thisform.cboFact.DisplayValue)='SGL'
sTo="priyantham@star.lk"
ENDIF
IF ALLTRIM(thisform.cboFact.DisplayValue)='SFC' OR ALLTRIM(thisform.cboFact.DisplayValue)='VTM' OR ALLTRIM(thisform.cboFact.DisplayValue)='GML' OR ALLTRIM(thisform.cboFact.DisplayValue)='SJR'
sTo="poornimae@star.lk"
ENDIF
IF ALLTRIM(thisform.cboFact.DisplayValue)='SGG' OR ALLTRIM(thisform.cboFact.DisplayValue)='VTE'
sTo="dinushaf@star.lk"
ENDIF
sCC="shehanig@star.lk"
[b]Here I created body[/b]
SqlExec(OpsHandle,"Exec SGLSQL.msdb.dbo.sp_send_dbmail 'AutoMail',@recipients=?sTo,@copy_recipients=?sCC, @subject=?sSubject,@Body=?clbody,@file_Attachments =''")
Inside this code I need to do my modifications. Can anyone please help me to do this?
Thank you