Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Error in document sending thrugh Email

$
0
0
Dear friends,

I am not getting results for sending a documents as attachment in email.

can you help please...


SMTPsetup.GET;
SenderName:=SMTPsetup."Email sender Name";
SenderAddress:=SMTPsetup."Email sender email";
Recipients:=vendorRec."E-Mail"+';'+SMTPsetup."Manager Email";

kSubject:="No."+' PO for '+FORMAT(Amount);
kBody:=' ';
Tofile := Name;
Tofile := "No."+'.pdf';


FileAndPathName := SMTPsetup."Path to Save Report" + Tofile;

FileAndPathName:=CONVERTSTR(FileAndPathName,'\','/');

FileName:=FileAndPathName;
WHILE STRPOS(FileName,'\') > 0 DO
FileName := COPYSTR(FileName, STRPOS(FileName,'\') +1);

CurrPage.SETSELECTIONFILTER(Rec);
REPORT.SAVEASPDF(405, FileName, Rec);

CLEAR(email);
email.CreateMessage(Recipients,'','',kSubject,kBody,FALSE,FALSE);
email.AddBodyline(' Dear Sir/Madam');
email.AddBodyline('<BR><BR>');
email.AddBodyline(' PO Document '+"No."+' '+"Pay-to Name"+' approved ');
email.AddBodyline('<BR><BR>');
email.AddBodyline('Operations');
email.AddBodyline('<BR><BR>');
email.AddBodyline('My Company');
email.AttachFile(FileName);
MESSAGE(FileName);
email.Send;
Pleasee..

kris

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>