Link to home
Start Free TrialLog in
Avatar of 4mrhodes
4mrhodes

asked on

Exchange 2007 and Coldfusion 8

I am having trouble sending mail from coldfusion 8 through an exchange 2007 server.  I have two exchange servers one on Server 2003 and one on Server 2008.  I am in the process of removing the 2003 box but when I point coldfusion to the 2008 box outside mail (mail sent to external addresses) stops working.  I get "invalid address" in the mail log.  The send connector on Exchange 2007 appears to be universal to all hub transport servers the receive connectors are set-up the same on both boxes.
Avatar of duncancumming
duncancumming
Flag of United Kingdom of Great Britain and Northern Ireland image

You're sure you can send external mail through the Server 2008 machine normally (i.e. not using Coldfusion)?  

It's more likely to be a problem with your Exchange configuration than Coldfusion.  Check your settings in CF Administrator.  Have you tried Verify Mail Server Connection successfully?  

The message could indicate a problem with how you're specifying email addresses in the cfmail tag.  Can you give us an example of your code you're trying to use for sending emails?  It may be that the second mailserver is stricter about the address format.  e.g. I moved from one mailserver to another that then prevented things like <cfmail from="Joe Bloggs"...>, it had to be a properly formatted email address.
Avatar of 4mrhodes
4mrhodes

ASKER

The 2008 box isn't having any trouble sending external mail accept mail from CF.  (note: Mail addressed to an internal user does go through from CF.)  'Verify' reports success.  below is the an email that was spooled in the "undelivered' folder on the CF server - should give you a good idea of what cfmail is creating..

type:  text/plain; charset=UTF-8
server:  10.169.101.2:25
from:  mrhodes@highmeadows.org
to:  carolynfish@comcast.net
subject:  HMS Form Portal Userinformation
X-Mailer:  ColdFusion 8 Application Server
body:  
body:  To access your household's account at the High Meadows School parent forms portal use the following credentials.
body:  
body:  Username:
body:  Password:
body:  
body:  https://hmsnet.org/hms
body:  

here is the actual cfmail tag.  I don't think this is it - my guess is it is something in exchange 2007 - but I figure out what is different on the settings in exchange 2007 on srv. 2003 and the exchange 2007 on 2008.

<cfmail to="#FORM.emailaddress#" from="mrhodes@highmeadows.org" subject="HMS Form Portal Userinformation">
To access your household's account at the High Meadows School parent forms portal use the following credentials.

Username: #Userinfo.UserName#
Password: #Userinfo.Password#

https://hmsnet.org/hms

</cfmail>
Another thing I've seen is where the mailserver will fail to deliver an email if you specify a from address that isn't in its address book.

e.g. in the example above, if your mailserver is acting for the highmeadows.org domain name, but mrhodes@highmeadows.org isn't an actual valid email address.  maybe it should be spelled mr.rhodes@highmeadows.org (let's pretend).  then the mailserver fails to send the email, despite it being technically correct.  

Also make sure things like spaces etc aren't present in your cfmail tags, e.g.
<cfmail from=" example@example.com "> would be better as
<cfmail from="example@example.com">
This is failing for all external mail?  You've tried testing it with say your own hotmail/gmail addresses?  Try trimming the #form.emailaddress#
mrhodes@highmeadows.org is my email address and is working.
I tried multiple external mail addresses.  I'll try trimming it, but it seems strange that it works when pointed at one exchange server but not the other exchange server.  To me that says 'exchange server setting'

In the mail log I get "invalid addresses" as the error - no matter what external address i try this happens and i am able to verify it didn't go through in a matter of seconds.
Still getting error.
Nov 17, 2008           5:27 PM           Error           scheduler-2             
Invalid Addresses

CODE:
<cfmail to="#trim(FORM.emailaddress)#" from="mrhodes@highmeadows.org" subject="HMS Form Portal Userinformation">
To access your household's account at the High Meadows School parent forms portal use the following credentials.

Username: #Userinfo.UserName#
Password: #Userinfo.Password#

https://hmsnet.org/hms

</cfmail>
Some kind of filtering in Exchange that's blocking all external addresses?
http://www.msexchange.org/tutorials/Sender-Recipient-Filtering.html
I'm running Exchange 2007 - looked at the filtering - most of it is set at the organizational level so both servers share the settings.
ASKER CERTIFIED SOLUTION
Avatar of 4mrhodes
4mrhodes

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial