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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Space in CDONTS code

Status
Not open for further replies.

Silvinho

Programmer
Jul 9, 2001
58
GB
Im using this bit of code below to use as a mailing list but whenever I have a space in the from part the mail will not be sent. ie: "Joe Bloggs". If i change this to "Joe_Bloggs" it works fine. Is it possible to have a space in this part of the code.
Also I wanted to get the From part from the form aswell using the request.form("txtFrom").

Can anyone help?

<%
While Not rsMAil.EOF
Set objCDOMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
objCDOMail.From = &quot;Joe Bloggs&quot;
objCDOMail.To = rsMAil(&quot;E_Mail&quot;)
objCDOMail.Subject = request.form(&quot;txtSubject&quot;)
objCDOMail.Body = request.form(&quot;txtMessage&quot;)
objCDOMail.Send
Set objCDOMail = Nothing
rsMAil.MoveNext
WEND
%>
 
The only thing I can think of is that the from field is usually used for the email addy of the sender. I've only ever had success with a complete addy.

have you tried something like:

Joe%20%Bloggs? or Joe&nbsp;Bloggs?? ClassyLinks :cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top