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

Getting anwsers from CFMAIL

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Is there any way to determine if CFMAIL has succesfully sent a message?
 
Hi Brommer,<br>There is a check box in the Cold Fusion Administrator under Logging/Mail Logging that can be checked that will log all emails sent by CF.&nbsp;&nbsp;It creates a log in your CFusion/mail/log directory.&nbsp;&nbsp;If you use it to mail a lot this file will get big!<br>Sherylj<br><A HREF="mailto:sjames@dcccd.edu">sjames@dcccd.edu</A>
 
Thanks but I was looking for something a little more direct, as in a user being notified immediately (or asap) if his message has been delivered succesfully or not, without me having to go through all the work of having the application dig through the mail logs.<br>Thanks anyway,<br>Brommer
 
We also have a page that gets displayed telling them their mail has been sent and what address it was sent to etc. if you're interested in that.&nbsp;&nbsp;<br><br>Sheryl :)<br>This follows the CFMAIL tag in my page.&nbsp;&nbsp;This particular app sends a user their username and password if they've forgotten it. <br>&nbsp;<br>&lt;CFIF EmailData.Email_Match IS &quot;0&quot;&gt;<br> &lt;CFSET Session.ErrorMessage = &quot;&lt;B&gt;You did not provide us with your email address when creating your user account.&nbsp;&nbsp;&lt;br&gt;You will be unable to retrieve this information via email.&nbsp;&nbsp;&lt;br&gt;Please check your spelling or see the instructions on the bottom of the page for further information. &lt;/B&gt;&quot;&gt;<br>&nbsp; &lt;CFLOCATION URL=&quot;login.ssj.cfm&quot;&gt;<br>&lt;CFELSE&gt;<br> &lt;CFMAIL query=&quot;LoginData&quot;<br> FROM=&quot;<A HREF="mailto:ssj1153@dcccd.edu">ssj1153@dcccd.edu</A>&quot;<br> TO=&quot;#LoginData.Email_1#&quot;<br> SUBJECT=&quot;DCCCD Online Student Application User Name and Password&quot;<br> SERVER=&quot;yourserver.com&quot;&gt;The Username chosen was #LoginData.user_name# and the password chosen is #LoginData.pw_1#.&nbsp;&nbsp;Please return to the <A HREF=" TARGET="_new"> login page to resume completing your Online Application.&lt;/CFMAIL&gt;<br>&lt;cfinclude template=&quot;header.cfm&quot;&gt;<br>&lt;cfoutput&gt;&lt;p&gt;Your password has been sent to &lt;b&gt;#Form.Email_1#&lt;/b&gt;.&nbsp;&nbsp;&lt;br&gt;Please retrieve your username and password and return to the &lt;a href=&quot;<A HREF=" TARGET="_new"> page&lt;/a&gt; to continue.&lt;/cfoutput&gt;<br>&lt;cfinclude template=&quot;footer.cfm&quot;&gt;<br>&lt;/CFIF&gt;
 
Usually what I do is CC the person that is sending the email.&nbsp;&nbsp;If you're checking the *code* to make sure that it's sending email, you can safely assume that if one gets it, both should get it.<br><br>But if you're talking about email verification of whether or not the email actually *reaches* the person, that's a little tricker. <p> <br><a href=mailto:aberman@thebiz.net>aberman@thebiz.net</a><br><a href= > </a><br>Database programmer and developer, fueled by peach snapple.
 
That can be a lot of email if only one person is getting the email confirmation!&nbsp;&nbsp;FYI!&nbsp;&nbsp;I've done it.&nbsp;&nbsp;I turned it off after a testing period and 4000+ emails. <br>Sheryl :)
 
YEOCH! :(<br><br>Well, it would be tested only once, and assuming that the person who gets the email changes, that would change.<br><br>If it doesn't change, it's definitely not a good solution, and I wouldn't recommend it or use it! <p> <br><a href=mailto:aberman@thebiz.net>aberman@thebiz.net</a><br><a href= > </a><br>Database programmer and developer, fueled by peach snapple.
 
Thanks for your replies, but what I meant was (sorry, I'll try to be a little more precise next time)that when the CF server encounters problems while sending a message (for instance the SMTP server giving an error) it logs it and files the message in the UNDELIVR directory but to the end-user it would seem as though his message has been sent.<br><br>I was hoping to find a 'neat' way to determine if any errors had occurred and to relay it back to the end-user.
 
something I came across is an undocumented CF function CFUSION_VERIFYMAIL() which verifies (doh) the connection to the mailserver.<br><br>You could use this with CFIF to test if the connection works, if it works i guess it would be pretty safe to say that any e-mail message would at least reacht the SMTP server.<br><br>The function takes 3 arguments the first of which is the server name, followed by 2 integers of which I have no idea what they do. It seems pretty much to work with any ol' integer though. If the mailserver has been succesfully connected it returns an empty string, if not it returns an error message.<br><br>Mind you I've only tested it once or twice so I'm not sure if it is absolutely failsafe.<br><br>Anybody any thoughts on this one?<br><br>Brommrrrrr (aka brommer)<br>
 
Would a CFCATCH & TRY around a CFMAIL accomplish the same thing?&nbsp;&nbsp;We display an error if the database is unavailable and I don't see why you couldn't do the same thing with CFMAILif the mail server is unavailable.&nbsp;&nbsp;I'll have to try it and see.&nbsp;&nbsp;If anyone has gotten this to work let me know.&nbsp;&nbsp;<br><br>Sherylj :)<br><br><A HREF="mailto:sjames@dcccd.edu">sjames@dcccd.edu</A>
 
Brommrrrr,<br><br>I'm having a similar problem with CFMail.&nbsp;&nbsp;I am not getting bouncebacks even when intentionally sending messages to invalid accounts.&nbsp;&nbsp;Were you able to find a solution to this problem?<br><br>-Rawle<br><A HREF="mailto:rawlea@hoopstv.com">rawlea@hoopstv.com</A>
 
Th only thing I've found was the allready mentioned CF function, I haven't really looked at it again, since it's not exactly #1 on my todo list, so I couldn't say if it works reliably.<br><br>Sorry, <br><br>Brommrrrr
 
Alas, I am not alone if the CFMAIL troubles!

We can send mail internally to addresses on our own domain with no trouble. But when we try to send to outside address (such as customers) the mail does not arrive, nor bounce. Through this thread I was able to discover the logs and it seems I am getting a RELAYING IS PROHIBITED error.

Any ideas?

 
This sounds like a network, firewall, or mail server problem. We have been sending emails perfectly fine to internal as well as external customers with no problem. We are using our main mail server and they go out and come in just fine. Of course we have to allow smtp to get through the firewall.

If I find out anything else I'll let you know.

Sheryl :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top