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

CDONTS - comma cut off and "Sent Items"

Status
Not open for further replies.

wrbodine

Programmer
Aug 24, 2000
302
US
Hi,

I'm using cdonts to send an email message through .asp, and am troubleshooting it to find out why it doesn't go in the "Sent Items" mailbox of the specified user who sent it. (Any hints on this would be greatly appreciated!) I've tried various values for the sending email address, and when I try and use the following:
LastName, FirstName

the message arrives saying its from: LastName

The comma must be cutting off itself and the first name. Is there any way to get around this? Are are there any other ideas for making sure the message goes to "Sent Items"???

Thanks,
Ray

Ps - here's the code I'm using:
strTo= "emailaddress@company.com"
strSubject = "Test"
HTML = &quot;<!DOCTYPE HTML PUBLIC&quot;&quot;-//IETF//DTD HTML//EN&quot;&quot;>&quot;
HTML = HTML & &quot;<html>&quot;
HTML = HTML & &quot;<head>&quot;
HTML = HTML & &quot;<title>Test message!</title>&quot;
HTML = HTML & &quot;</head>&quot;
HTML = HTML & &quot;<body bgcolor=&quot;&quot;FAF6DD&quot;&quot;>&quot;

HTML = HTML & &quot;<p align = &quot;&quot;center&quot;&quot;>&quot; & Request.Form(&quot;Message&quot;) & &quot;</p>&quot;
HTML = HTML & &quot;</body>&quot;
HTML = HTML & &quot;</html>&quot;
strBody= HTML

Set objCDONTSMail = CreateObject(&quot;CDONTS.NewMail&quot;)

objCDONTSMail.Mailformat=0
objCDONTSMail.Bodyformat=0
objCDONTSMail.From = &quot;ValidLastName, ValidFirstName&quot;
objCDONTSMail.To = strTo
objCDONTSMail.Subject = strSubject
objCDONTSMail.Body = strBody

objCDONTSMail.Send
 
Sorry, but as far as I know, CDONTS bypasses the outlook mailbox, and is just sent. Think of it like the back end behind outlook without the nice folders and contacts. As far as your comma goes, the from field is normally used for the reply email address, so commas are seen as separate addresses. This will not get the mail into the sent items.

The only way to keep track is to use the CC property to ensure that the sender recieves a copy into their inbox. You could always then set up mail rules to move it to their sent items.

Or you could create a text file each time, or add it to a database ... etc.... Derren
[Mediocre talent - spread really thin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top