Added to Job Queue E-Mail

Since the report that I posted earlier simply sends an PDF copy of the Invoice and Credit Memo to the recipient via SMTP mail you do not have a copy of that E-Mail in your inbox or sent items.

I added a single line of code to send a carbon copy of the E-Mail to the sender.

[code]

IF CompanyInformation."Ship-to Contact" <> ” THEN BEGIN
SMTPMail.AppendBody(CRLF);
SMTPMail.AppendBody(Text004);
SMTPMail.AppendBody(CRLF);
SMTPMail.AppendBody(CompanyInformation."Ship-to Contact");
SMTPMail.AppendBody(CRLF);
END;

SMTPMail.AddCC(CompanyInformation."E-Mail"); // Add this line
SMTPMail.AddAttachment(Directory + FileName);
SMTPMail.Send;
[/code]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.