Ask a Question related to ASP Components, Design and Development.
-
Raju #1
Email CDO.Message
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"<name@name.com>
If I pass this as a constant like
Email From """Name"" <name@name.com>" 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 = "test@test.com"
..From = sCSEMailFrom
..Subject = " Test"
End With
Set oConf = Nothing
Set oMail = Nothing
Raju Guest
-
How to Change the Email Subject and Default Message?
Hi and thanks in advance for the help. I've created a PDF form that uses an email submit button but would like to use the contents of one of the... -
#26294 [Opn->Csd]: Message gets truncated on sending out email.
ID: 26294 Updated by: sniper@php.net Reported By: ccetanr at nus dot edu dot sg -Status: Open +Status: ... -
PHP email message composing
Hi all, I am trying to create an automatic email composing script, but I have one big problem here. The message composing method I'm using is... -
error message (email)
The host 'SMTP' could not be found. Please verify that you have entered the server name correctly. Account: 'IMAP', Server: 'SMTP', Protocol: SMTP,... -
Open URL from email message
Hi, When reading from email message using Net::POP3 (or other means), I need my perl program to open URLs incuded into the message. In other... -
Daniel Crichton #2
Re: Email CDO.Message
Raju wrote on Thu, 05 Jul 2007 16:20:21 -0700:
When you say that line fails, do you mean it gives the wrong value? If it's> 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"<name@name.com>
>
> If I pass this as a constant like
>
> Email From """Name"" <name@name.com>" 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)
causing an error then that suggests either the name or email is null.
If it's just that you get the wrong value, it's because you have no quotes
are the name part, so you end up with
Name <name@name.com>
instead of
"Name" <name@name.com>
Try this:
sCSEmailFrom = """" & sCSName & """ <" & sCSEMail & ">"
Dan
Daniel Crichton Guest



Reply With Quote

