adamsoderqvist
Programmer
Hallo every one.
I want to send e-mail with VBScript, and use this code:
***************** C O D E ********************
'Begin e-mail sequence!
Dim strFrom, strTo, strSubject, strMessage, objMail
'Get senders info
strFrom = "xx@xxx.com"
'Get recipients info
strTo = "xx@xxx.com"
'Subject
strSubject = "X"
'Message body
strMessage = "My msg
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = strFrom
objMail.To = strTo
objMail.Subject = strSubject
objMail.Body = strMessage
objMail.AttachFile = "C:\XX.doc"
objMail.Send
Set objMail = Nothing
***************** E N D C O D E ********************
Now, the code works fine when sending just the mail, but I can't get it to work with the attachment-code-line (see above).
So my Q is easy: how do I send e-mail with one (and more) attached files?
/Adam
I want to send e-mail with VBScript, and use this code:
***************** C O D E ********************
'Begin e-mail sequence!
Dim strFrom, strTo, strSubject, strMessage, objMail
'Get senders info
strFrom = "xx@xxx.com"
'Get recipients info
strTo = "xx@xxx.com"
'Subject
strSubject = "X"
'Message body
strMessage = "My msg
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = strFrom
objMail.To = strTo
objMail.Subject = strSubject
objMail.Body = strMessage
objMail.AttachFile = "C:\XX.doc"
objMail.Send
Set objMail = Nothing
***************** E N D C O D E ********************
Now, the code works fine when sending just the mail, but I can't get it to work with the attachment-code-line (see above).
So my Q is easy: how do I send e-mail with one (and more) attached files?
/Adam