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

CFMAIL Domain Check

Status
Not open for further replies.

Streetdaddy

Programmer
Jun 10, 1999
161
AU
When sending mail CF server checks the domain of 'from' email address, and doesnt send the mail if the domain is unrecognised.

- 1: Can I turn off the domain check all together?
or
- 2: Can I check the domain myself with some CFML?
or
- 3: Can I get CF to throw an error if the domain is unrecognised?

Cheers Miles
vmiles@senet.com.au
 
I don't think that CFMAIL actually checks to make sure the domain name portion of the address is valid. I think it only checks to make sure that the address is in a valid e-mail address format. To verify an address, download one of the tags from the Allaire Developer's Exchange. There are a few. Here's a link to one of them:


Good luck! Andrew
 
This is a line from the CF server mail.log

&quot;Error&quot;,&quot;TID=340&quot;,&quot;03/06/01&quot;,&quot;13:12:35&quot;,&quot;Failed to send the spooled mail file, C:\CFUSION\MAIL\spool\5E9.cfmail. SMTP server replied &quot;<jim@bean.com.au>... Sender domain must exist&quot; Moved file to C:\CFUSION\MAIL\undelivr\5EA.cfmail.&quot;

So I think that in some cases it DOES check the domain, but then this could also be the actual mail server that it uses, which is a unix box. But it has a CF error tid so I am pretty sure that it IS CF Server error. The absolute worst part about it is that I can't work out how to catch the error!

Help anyone? Miles
vmiles@senet.com.au
 
Oops, if I read that error carefully i notice the

&quot;SMTP server replied &quot;<jim@bean.com.au>... Sender domain must exist&quot;

part and I guess it definitely IS the mail server, not CF...

But still, I can't detect the error! Miles
vmiles@senet.com.au
 
that's weird ... if it is the SMTP, why would it go to CF's bad queue??? is that the only address it happens on, or is this frequent?
also what version of CF are you using?

-Marc
 
What's happenning in this case is that the CF mailer is communicating with the mail server and the mail server is refusing to accept the message for delivery. Since the message is never sent, CF is aware of the problem and can log it. Had the message actually been delivered but had other delivery errors, you would never see it in the CF logs.

You could write a script to check the undeliverable folder for messages that haven't been delivered if you need to check for errors. I don't believe there is any way though to catch this kind of error from within the sending script unless they've made changes to the mailer in 4.5.1.

GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top