Quantcast
Channel: Dynamics User Group
Viewing all articles
Browse latest Browse all 15740

Trouble Sending Mail with CDU 400

$
0
0

My code looks as below. I have already done the batch processing of .pdfs into the Invoices folder with the filename convention reflected below. I have also set up the SMTP configuration as anonymous, though I have also tried Basic, but with the same results. With basic, our smtp server in mail.myclient.ug, through hostgator web hosting servers in the US (Basically the domain is hosted on hostgator).

FileDirectory := 'E:\Invoices\';
IF Customer.GET("Sell-to Customer No.") THEN
  FileName := 'Inv-'+Customer."No." +'-'+"No."+'.pdf';

cduMail.CreateMessage('Annual Invoice','accounts@myclient.ug',
                     'copy@myclient.ug',
                     'Invoices for 2012/1013',
                     'Please confirm receipt',
                     TRUE);
cduMail.AddCC('support@myclient.ug');
cduMail.AddAttachment(FileDirectory+FileName);
cduMail.Send;

When I attempt to execute the code, I get the error "The SMTP mail system returned the following error: (0x80040213): The transport failed to connect to the server."

Robert


Viewing all articles
Browse latest Browse all 15740

Trending Articles