ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old September 19th, 2003, 12:38 AM
jimriggott jimriggott is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 53 jimriggott User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 13 m 57 sec
Reputation Power: 6
Erratic aspMail performance

I have a page which processes ecards. Users fill in a form, and the data gets loaded into a db, and recipients get emailed to say they've got the ecard.

However in about 25% of cases, the user does not get the ecard.

My host uses ServerObject's ASPMail. The script that send the email out is at the end of the process.asp page after the </HTML> tag, and this is what it looks like:

PHP Code:
 BODY "Test line"
Set Mailer Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName   from_name
Mailer
.FromAddressfrom_email
Mailer
.RemoteHost "smtp.jimpix.co.uk"
Mailer.AddRecipient to_nameto_email
Mailer
.Subject    "ecard sent..."
Mailer.BodyText   body

    
if Mailer.SendMail then
          Response
.Write "&nbsp"
    
else          
        
err "INSERT INTO j_ecard_err (fldDate, errorDesc, cardID) VALUES (now(), '"&Mailer.Response&"',"&maxID&")"
        
set errRS oConn.Execute(err)
        '
Response.Write "Mail send failure. Error was " & Mailer.Response
    end if

Set Mailer = nothing 


The code says php above, but it is ASP, that's just for the formatting...

There are no loops or reponse.redirects above the code, which would mean that at some point the page might redirect to another page, it should just run from top to bottom without a problem. I have tried for a while to BCC the email to myself, but they don't come through all the time either, so something is going wrong.

e.g. Today 20 ecards were sent from the site, but I only got 15 BCC emails. So I presume if I didn't get the email neither did the person the ecard was destined for.

I've set the code to write the code to a db if it doesn't work, but for some reason this db is still empty, so even though the email code isn't executed, it's not I presume because it's erroring, otherwise it'd be added to the database.

The rest of the ASP code to enter the data into the database does not error out either. I've tested the page myself a number of times and it runs fine. I don't use 'on error resume next' or any error trapping on any other part of the page, so if it was going to error I'd get an error message. Instead it seems to run fine, but sometimes the email does not get sent.

I've attached the process.asp file in case anyone needs / wants to see the rest of the code.

And ideas?

Thanks

Jim
Attached Files
File Type: asp process.asp (8.7 KB, 206 views)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Erratic aspMail performance


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway