Forum Moderators: open
Object doesn't support this property or method: 'mail.AddAddress'
i have the following code:
set mail = server.CreateObject("persits.mailsender")
mail.host = "smtp.ntlworld.com"
mail.from = "bill@bill.ge.com"
mail.FromName = "gill@gill.com"
mail.AddAddress = "fred@fred.com"
mail.AddCC = "jon@jon.com"
mail.subject = "eps Change control process - issue raised"
mail.body = "<HTML><HEAD></HEAD><BODY>"
mail.send
set mail = nothing
can anyone help out with what the problem is here?
mail.AddAddress = "fred@fred.com"
mail.AddCC = "jon@jon.com"
Don't use an "=". You pass those to the method with out the "=".
mail.AddAddress "fred@fred.com"
mail.AddCC "jon@jon.com"
You can also add the name to them if you want like:
mail.AddAddress "fred@fred.com", "Fred Jones"
mail.AddCC "jon@jon.com", "Jon Fredrickson"
But the name is optional.
If you have here's a sample code from a tutorial site:
' SEND EMAIL
Dim trixMail, trixBody
Set trixMail = CreateObject("CDONTS.NewMail")
trixBody="First Name: "& request.form("firstname") & vbcrlf
trixBody=trixBody & "Last Name: " & request.form("lastname") & vbcrlf
trixBody=trixBody & "E mail: "& request.form ("email") & vbcrlf
trixMail.From="mail@yourplace.co.uk"
trixMail.To="mail@yourplace.co.uk"
trixMail.CC=request.form("email")
trixMail.Subject="NEW ADDITION TO DATABASE"
trixMail.Body=trixBody
trixMail.Send
set trixMail=nothing
Tutorial page address: [webthang.co.uk...]
Doesn't work locally
Hope this helped
Leo
I you wish to buy the program you can find it at "programname".com (look above)
(not allowed to post the URL)
You migth wanna change the:
mail.host = "smtp.ntlworld.com"
to an open relay unless you have you own mailserver then you enter your own SMTP address
Does this make sence?