Mail From Field (newbie)

Discussion in 'ASP General' started by Summerhouseofyolo.org, Nov 2, 2005.

  1. 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=""
    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
     
    Summerhouseofyolo.org, Nov 2, 2005
    #1
    1. Advertising

  2. Summerhouseofyolo.org

    Bullschmidt Guest

    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 <>"

    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=""
    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
    >>


    *** Sent via Developersdex http://www.developersdex.com ***
     
    Bullschmidt, Nov 2, 2005
    #2
    1. Advertising

  3. Thanks Paul! Didn't know I could do that.

    -Greg
     
    Summerhouseofyolo.org, Nov 2, 2005
    #3
  4. Summerhouseofyolo.org

    Bullschmidt Guest

    Bullschmidt, Nov 2, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Curt_C [MVP]
    Replies:
    5
    Views:
    422
    Karim
    May 19, 2004
  2. me
    Replies:
    0
    Views:
    490
  3. =?Utf-8?B?TXJGZXo=?=

    Mail message size problem (System.Web.Mail)

    =?Utf-8?B?TXJGZXo=?=, Mar 14, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    669
    =?Utf-8?B?TXJGZXo=?=
    Mar 14, 2005
  4. Sound
    Replies:
    2
    Views:
    501
    Randy Webb
    Sep 28, 2006
  5. jr
    Replies:
    3
    Views:
    499
Loading...

Share This Page