Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending message with cdo

Status
Not open for further replies.

maanton

Programmer
Mar 27, 2005
52
Hello!
I have the following code:

<%
theSchema="Set cdoConfig=server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(theSchema & "sendusing")=2
cdoConfig.Fields.Item(theSchema & "smtpserver")="mx1.hotmail.com"
cdoConfig.Fields.Update

set cdoMessage=Server.CreateObject("CDO.Message")
cdoMessage.Configuration=cdoConfig

cdoMessage.From=Request.Form("email")
cdoMessage.To="mymail@hotmail.com"
cdoMessage.Subject=Request.Form("subject")
cdoMessage.TextBody= Request.Form("comment")

cdoMessage.Send

Set cdoMessage=Nothing
Set cdoConfig=Nothing
%>

What I want is (when I receive the message in my mailbox), FROM to display my site's name instead of the sender's address.

I tried that unsuccessfully:
cdoMessage.From="mysite"

What do you suggest?
 
try
Code:
cdoMessage.from = """" & Request.Form("name") & """ <" & Request.Form("email") & ">"
 
Use the reply to property... so...

cdoMessage.From="My Website"
cdoMessage.ReplyTo="myemail@mywebsite.com"
cdoMessage.To="mymail@hotmail.com"
cdoMessage.Subject=Request.Form("subject")
cdoMessage.TextBody= Request.Form("comment")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top