NEWBIE: How to create a log file

T

Tomas Vera

Hello All,
I'm new to ASP and am having problems with CDONTS.NewMail not always
delivering my mail. Unfortunately, it always seems to fail on a
particular recipient, so he's getting steamed!

In my code, I create two e-mails, one to an end-user, and one to a
sales rep. The e-mail to the user always succeeds, but the email to
the sales reps fails about 15-25% of the time. I'm trying to debug the
ASP page, and I figure using a log file may be the best way.

I want to test the sales rep's newMail object and write to a log file
when it fails (IsNull()), but I don't know how to create a log file in
ASP. Example:

Dim newMail
newMail = Server.CreateObject ("CDONTS.NewMail")
if(IsNull(newMail) then
' Code to write to a log file goes here
' Record the e-mail info for re-send later
' What goes here
else
' Code to create the mail components goes here
newMail.Send
newMail = nothing
end if

I know this is super-simple and just need a quick code snippet.

Thanks
-tomas
 
T

Tomas Vera

Thanks!
That's exactly what I was looking for.

-tomas (posting via some web site!)
 
D

dlbjr

Tom,

Just curious -
what email clients are they using?

CDONTS email settings by default will not push to a Lotus Notes Client, but
will work with many others like outlook.

Here are settings to send email to a Lotus Domino Server.

Set MailObj = CreateObject("CDONTS.NewMail")
MailObj.MailFormat = 0
MailObj.BodyFormat = 0
MailObj.From = "me"
MailObj.To = "you"
MailObj.Subject = strSubject
MailObj.Body = strMemo
MailObj.Send

-dlbjr

invariable unerring alien
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top