Mail From Field (newbie)

  • Thread starter Summerhouseofyolo.org
  • Start date
S

Summerhouseofyolo.org

I am sending the results from a form to myself, and would like the name
to be formatted as entered. I have noticed that they myMail.From
command does not work unless the input is formatted to have no spaces.
My code for the mail looks like this:

xformatname = replace(xname," ","_")

Set myMail=CreateObject("CDONTs.NewMail")
myMail.Subject="Raffle Tickets Purchased"
myMail.From=xformatname
myMail.To="(e-mail address removed)"
myMail.Body=xbody
myMail.Send
set myMail=nothing

It seems like there must be a way to format the From field to use
spaces, but I can't figure it out.

Thanks in advance!

Greg @ Summer House
 
B

Bullschmidt

Well e-mail addresses aren't allowed to have any spaces unless you do
something like this to show a name with the e-mail address:

myMail.From="John Doe <[email protected]>"

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips

<<
I am sending the results from a form to myself, and would like the name
to be formatted as entered. I have noticed that they myMail.From
command does not work unless the input is formatted to have no spaces.
My code for the mail looks like this:

xformatname = replace(xname," ","_")

Set myMail=CreateObject("CDONTs.NewMail")
myMail.Subject="Raffle Tickets Purchased"
myMail.From=xformatname
myMail.To="(e-mail address removed)"
myMail.Body=xbody
myMail.Send
set myMail=nothing

It seems like there must be a way to format the From field to use
spaces, but I can't figure it out.

Thanks in advance!

Greg @ Summer House
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top