Send email with attachment (MAPI)Tag(s): Powerscript
About cookies on this site
We use cookies to collect and analyze information on site performance and usage,
to provide social media features and to enhance and customize content and advertisements.
Got it
mailsession lms_sess
mailmessage lm_mess
mailrecipient lm_recipient
mailFileDescription lmf_file
mailreturncode lmc_rc
lmf_file.FileType = mailAttach!
lmf_file.FileName = "report.psr"
lmf_file.PathName = "c:\temp\" + "report.psr"
lm_mess.NoteText = "this my report."
lm_mess.Subject = "report may2004"
lm_mess.Attachmentfile[1] = lmf_file
lm_recipient.Address = "someone@somewhere.com"
lm_recipient.Name = "Mr. Brown"
lm_recipient.RecipientType = mailTo!
lm_mess.Recipient[1] = lm_recipient
lms_sess = create mailsession
lmc_rc = lms_Session.mailLogon()
lmc_rc = lms_Session.mailSend(lm_Message)
IF lmc_rc <> mailReturnSuccess! THEN
MessageBox("Error", "Error on Send")
END IF
lmc_rc = lms_sess.mailLogoff()
DESTROY lms_sess
comment Comments ( )