R
Raju
I am using CDO.Message to create an email. Currently the email sent
says the email id of the sender however i would like it to say the
name + email id something like this
Email From : " Name"<[email protected]>
If I pass this as a constant like
Email From """Name"" <[email protected]>" it works. However when I try
to
get the values and concatenate from the tables it fails. Any idea:
strSQL = "select top 1 * from tblEmail"
Set rs = Server.CreateObject("ADODB.Recordset")
Call GenerateRecordSet(strSQL,rs)
sCSName = rs("ConfirmationEmailName")
sCSEMail = rs("ConfirmationEmailSender")
sCSEmailFrom = sCSName & " <" & sCSEMail & ">" (This line will
fail)
rs.Close
Set rs = Nothing
Set oMail = Server.CreateObject("CDO.Message")
set oConf = CreateObject("CDO.Configuration")
With oMail
Set .Configuration = oConf
..HTMLBody = "Test"
..To = "(e-mail address removed)"
..From = sCSEMailFrom
..Subject = " Test"
End With
Set oConf = Nothing
Set oMail = Nothing
says the email id of the sender however i would like it to say the
name + email id something like this
Email From : " Name"<[email protected]>
If I pass this as a constant like
Email From """Name"" <[email protected]>" it works. However when I try
to
get the values and concatenate from the tables it fails. Any idea:
strSQL = "select top 1 * from tblEmail"
Set rs = Server.CreateObject("ADODB.Recordset")
Call GenerateRecordSet(strSQL,rs)
sCSName = rs("ConfirmationEmailName")
sCSEMail = rs("ConfirmationEmailSender")
sCSEmailFrom = sCSName & " <" & sCSEMail & ">" (This line will
fail)
rs.Close
Set rs = Nothing
Set oMail = Server.CreateObject("CDO.Message")
set oConf = CreateObject("CDO.Configuration")
With oMail
Set .Configuration = oConf
..HTMLBody = "Test"
..To = "(e-mail address removed)"
..From = sCSEMailFrom
..Subject = " Test"
End With
Set oConf = Nothing
Set oMail = Nothing