Confirm that message was sent

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
Pate
Forum Newbie
Posts: 1
Joined: Fri Nov 30, 2007 11:57 am

Confirm that message was sent

Post by Pate »

Hey,

Using PHP5 and Swiftmailer 3.3.2.

Lately I'm experiencing some issues when sending emails. It's random as far as I see it, so issue is most likely somewhere on the server. Until this is resolved, I need a way to verify if a message was sent or not.

I'm using catch() and get the error Swift_ConnectionException. As far as I understand the documentation this means no message should have been sent but it is.

Is there something in $swift that I can use to confirm the message was sent or not?
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

I'm not 100% sure you can do this on the fly with PHP. The reason is because once PHP has determined that the mail function executed without any errors, it exits and leaves the mail server to deal with sending the email out. You can have a que process run that checks to see if emails are just sitting on the server and report in a seperate admin screen though, which is what I normally do. Sorry man, that's a tough one cuz I've had the same problems myself.
Post Reply