Hello all,
I have a quick question. How do I send an e-mail with and attachment? I am creating a reporting engine which sends reports via e-mail. I know there are more glorious ways to do. Currently, I send the email out with the report embedded as a csv file in the message. I want to attach the report instead.
Most of the code I am using is below.
oMsg.TextBody = "This is my message"
oMsg.Subject = "This is my title"
oMsg.From = "xxxx@xxx.com"
oMsg.To = "yyyy@xxx.com"
oMsg.Send()
oMsg = Nothing
iconfg = Nothing
ofields = Nothing
ofield = Nothing
I can send an e-mail. No problem. I have not been able to figure out how to send the attachment. I have been messing around with variations of the code listed below:
oMsg.Attachments.Add.FileName = "c:\file.xls"
Any help that you can provide would be greatly appreciated.
Thank you
Quahog
I have a quick question. How do I send an e-mail with and attachment? I am creating a reporting engine which sends reports via e-mail. I know there are more glorious ways to do. Currently, I send the email out with the report embedded as a csv file in the message. I want to attach the report instead.
Most of the code I am using is below.
oMsg.TextBody = "This is my message"
oMsg.Subject = "This is my title"
oMsg.From = "xxxx@xxx.com"
oMsg.To = "yyyy@xxx.com"
oMsg.Send()
oMsg = Nothing
iconfg = Nothing
ofields = Nothing
ofield = Nothing
I can send an e-mail. No problem. I have not been able to figure out how to send the attachment. I have been messing around with variations of the code listed below:
oMsg.Attachments.Add.FileName = "c:\file.xls"
Any help that you can provide would be greatly appreciated.
Thank you
Quahog
PHP:
[CODE]