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!

objNewMail.Subject adding commas?? 2

Status
Not open for further replies.

nzgirl

Programmer
Feb 26, 2003
72
NZ
Hi All
My subject line (standard send mail form) is either populated from the calling program or filled in by the user. It appears fine and I've checked that the calling program doesn't add the comma... but as soon as I request it(ie press send) there is a ', ' at the front of the subject line...
I've checked the HTML and I can't see any floating commas...

does anyone have any ideas?

Thanks
:)
 
Have you tried hard coding the subject line and seeing if the comma is there.

That way you may be able to tell where it is being inserted.

Show us your...mail object code.

Steve Davis
hey.you@hahaha.com.au

Me? I can't even spell ASP!
 
SubjectL = request("subject")
Dim ObjNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = FromName & &quot;<&quot; & SendFrom & &quot;>&quot;
objNewMail.To = SendTo
objNewMail.Subject = SubjectL
objNewMail.Body = BodyText
objNewMail.Send

but its there after the request... Don't think its part of the object.
 
Try objNewMail.Subject = &quot;Test Subject&quot; and see if it is there.

If not, it is being picked up in the SubjectL variable

If that is a form field, check to make sure you only have one field with that name on the page.

If it is just int he var, then you are going to have to tease it apart and find the extra comma.

When you do find the extra comma, hang on to it as I saw a post about a missing comma and it looks like you might have it.

Steve Davis
hey.you@hahaha.com.au

Me? I can't even spell ASP!
 
Hmmmmm
Thanks for your reply....

I'm under a time constraint so I ended up just looking for it and removing it if it exisited... I could save them to a table to return to their rightful owners??

Thanks again
Beth
 
verify you dont have more than one field with the same name ie ... subject.. cause multiples of same field will be comma delimited in the form passing, and if one's blank then you'll get a leading or trailing comma on the request
 
Ok. I fess up. I had duplicated the variable but forgotten bout it and in my hurry... anyways... its all beautiful now...
Thanks Heaps! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top