[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Exchange 2007 and Coldfusion 8

Posted on 2008-11-17
11
Medium Priority
?
669 Views
Last Modified: 2013-12-24
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.
0
Comment
Question by:4mrhodes
  • 7
  • 4
11 Comments
 
LVL 16

Expert Comment

by:duncancumming
ID: 22980033
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.
0
 
LVL 1

Author Comment

by:4mrhodes
ID: 22980077
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:  

0
 
LVL 1

Author Comment

by:4mrhodes
ID: 22980112
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>
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
LVL 16

Expert Comment

by:duncancumming
ID: 22980142
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">
0
 
LVL 16

Expert Comment

by:duncancumming
ID: 22980164
This is failing for all external mail?  You've tried testing it with say your own hotmail/gmail addresses?  Try trimming the #form.emailaddress#
0
 
LVL 1

Author Comment

by:4mrhodes
ID: 22980173
mrhodes@highmeadows.org is my email address and is working.
0
 
LVL 1

Author Comment

by:4mrhodes
ID: 22980205
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.
0
 
LVL 1

Author Comment

by:4mrhodes
ID: 22980241
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>
0
 
LVL 16

Expert Comment

by:duncancumming
ID: 22980295
Some kind of filtering in Exchange that's blocking all external addresses?
http://www.msexchange.org/tutorials/Sender-Recipient-Filtering.html
0
 
LVL 1

Author Comment

by:4mrhodes
ID: 22980437
I'm running Exchange 2007 - looked at the filtering - most of it is set at the organizational level so both servers share the settings.
0
 
LVL 1

Accepted Solution

by:
4mrhodes earned 0 total points
ID: 22980585
Problem solved - I had forgot a step i had to do when setting up the receive connector on the original box - to allow relays you have to get the connector the proper permissions.  (i.e. i was authenicating as anonymous but for that to work you have to bind the anonomous group to the exchange group for that receive connector

CODE for Exchange shell:

Get-ReceiveConnector RelayConnector | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient"

see
http://exchangepedia.com/blog/2007/01/exchange-server-2007-how-to-allow.html

after doing the binding it works.


0

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to effectively resolve the number one email related issue received by helpdesks.
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question