S
Simon Wigzell
My website sends automatic emails from many (25) different places. I want to
send a second email by reading the parameters of the first one. I don't want
to have to repeat and maintain the assignment of the second email
From,To,Subject fields so I am just using an include at each point in the
code where I send an email:
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.BodyFormat= 0
MyCDONTSMail.MailFormat= 1
MyCDONTSMail.From= (e-mail address removed)
MyCDONTSMail.To= (e-mail address removed)
MyCDONTSMail.Subject="some subject"
MyCDONTSMail.Body= "some text":
%>
<!--#include file="SendFollowUpEmail.asp" -->
<%
MyCDONTSMail.Send
set MyCDONTSMail=nothing
-------------------------------------------------------------------------------
The SendFollowUpEmail.asp just wants to take the From,To,Subject parameters
that are defined in the original email and add a different body:
Set MyCDONTSMail2 = CreateObject("CDONTS.NewMail")
MyCDONTSMail2.BodyFormat= 0
MyCDONTSMail2.MailFormat= 1
MyCDONTSMail2.From= MyCDONTSMail.From
MyCDONTSMail2.To= MyCDONTSMail.To
MyCDONTSMail2.Subject=MyCDONTSMail.Subject
MyCDONTSMail2.Body= "some new text"
MyCDONTSMail2.Send
set MyCDONTSMail2=nothing
It chokes on this:
MyCDONTSMail2.From= MyCDONTSMail.From
Object doesn't support this property or method: 'MyCDONTSMail.From'
Seems to me MyCDONTSMail.From is only a string, why can't I retrieve its
value? More to the point though - how can I retrieve its value?
Thanks!
send a second email by reading the parameters of the first one. I don't want
to have to repeat and maintain the assignment of the second email
From,To,Subject fields so I am just using an include at each point in the
code where I send an email:
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.BodyFormat= 0
MyCDONTSMail.MailFormat= 1
MyCDONTSMail.From= (e-mail address removed)
MyCDONTSMail.To= (e-mail address removed)
MyCDONTSMail.Subject="some subject"
MyCDONTSMail.Body= "some text":
%>
<!--#include file="SendFollowUpEmail.asp" -->
<%
MyCDONTSMail.Send
set MyCDONTSMail=nothing
-------------------------------------------------------------------------------
The SendFollowUpEmail.asp just wants to take the From,To,Subject parameters
that are defined in the original email and add a different body:
Set MyCDONTSMail2 = CreateObject("CDONTS.NewMail")
MyCDONTSMail2.BodyFormat= 0
MyCDONTSMail2.MailFormat= 1
MyCDONTSMail2.From= MyCDONTSMail.From
MyCDONTSMail2.To= MyCDONTSMail.To
MyCDONTSMail2.Subject=MyCDONTSMail.Subject
MyCDONTSMail2.Body= "some new text"
MyCDONTSMail2.Send
set MyCDONTSMail2=nothing
It chokes on this:
MyCDONTSMail2.From= MyCDONTSMail.From
Object doesn't support this property or method: 'MyCDONTSMail.From'
Seems to me MyCDONTSMail.From is only a string, why can't I retrieve its
value? More to the point though - how can I retrieve its value?
Thanks!