Skip to main content

Posts

Showing posts with the label attachmentcollection

Code to send email with attachment using dynamics MSD axapta x++

Code to send email with attachment using dynamics axapta x++ void SendEMail() {     System.Net.Mail.MailMessage              Message;     System.Net.Mail.Attachment              attachment;     System.Net.Mail.AttachmentCollection    attachementCollection;     System.Net.Mail.SmtpClient              smtpClient;     System.Net.Mail.MailAddress             emailfrom;     System.Net.Mail.MailAddress             emailto;     str                                     messageBody ;     str                                     Subject;     str                                     SMTPServer;     str                                     Filenm;     FileIOPermission                        permission1;     ;     emailfrom = new System.Net.Mail.MailAddress(" From@xyz.com ","");     mailAddressTo = new System.Net.Mail.MailAddress(" To@abc.com ","");     messageBody = "This is test mail";     Subject = "Subject";     SMTPS