Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Mail From Field (newbie)

Reply
Thread Tools

Mail From Field (newbie)

 
 
Summerhouseofyolo.org
Guest
Posts: n/a
 
      11-02-2005
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 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

 
Reply With Quote
 
 
 
 
Bullschmidt
Guest
Posts: n/a
 
      11-02-2005
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 <(E-Mail Removed)>"

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


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Summerhouseofyolo.org
Guest
Posts: n/a
 
      11-02-2005
Thanks Paul! Didn't know I could do that.

-Greg

 
Reply With Quote
 
Bullschmidt
Guest
Posts: n/a
 
      11-02-2005
You're welcome Greg!

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

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
how to show an Image field from a SQL Server table field to a aspx page J Sahoo ASP .Net 3 04-30-2009 08:30 PM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
Validating a field based on value of another field Emmanuel ASP .Net 1 11-22-2005 12:35 PM
Placing the selection of a list field in a text field Jerry Manner HTML 5 06-09-2005 01:52 PM



Advertisments