CFMail delivery problem

I am using CFMAIL to send an eCard. I get the confirmation page, but the message does not get delivered. I checked the mail log and I see the following errors. The email addresses I am using to test the form are valid. I just changed it belowfor this post:

Invalid Addresses; nested exception is: class javax.mail.SendFailedException: 550 <>, Recipient unknown

I have the correct mail server in the Mail settings. Other forms on this server using CDONTS have been processed successfully.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

semerjAuthor Commented:
Also, in the Mail setting in CF administrator, I receive the Connection Verification Successful message so I know I have the correct settings.

It means the email address you are sending to is invalid.

semerjAuthor Commented:
I am inputting my valid email address into the actual form as the send to. I have tried it with multiple valid email addresses and still not dice.
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Although it is pretty difficult to diagnose without seeing the code but there are a few things that can generate this less than intuitive error message.  Have you made sure that your email server will send mail without authentication or that you have included the appropriate authentication information (account/password) in the <cfmail> tag?  Are you sending the eCard via a link or using <cfmailparam> to include an actual file?  Or are you grabbing the content of the eCard and actually writing it out on the body of the email?  Have you specified an HTML type for the email?

Most importantly:  If your server and the email server are not the same server, is your email server set to allow SMTP relays from the IP address of the CF server?  This can also cause the problem I think.  I don't know what email server you are using but all email servers have some sort of SMTP relay feature.  It may also help to make sure that the SMTP transport for IIS is operational, but it really shouldn't be using it so I doubt that is the cause.

Have you tried just using <cfmail> to send yourself a simple 'Hello World' text email?  Does this fail too?  Have you specified a subject for the email (some email server's spam filter's will block blank subject emails).  Is the account that you are sending the email from have any restrictions on it, and is it local or remote to the one listed in the TO parameter?  If not try it from one local address to another local address and see if that works.  If so then you have a SMTP relay issue, if not then you have another issue.

I'd have to assume that the problem is on the actual mail server rather than CF if you have checked everything over and it's still not working.
try using simple text email i think you may have problem with attachments because some mail servers block the mails with attachements
semerjAuthor Commented:
I am sending the eCard in the message body as HTML. However, the simple contact form does not work either. Below is my code that I have used a million times on other servers. I am not a novlice when it comes to CFMAIL. I am a novice when it comes to setting up CF administrator on someone elses server. The connection was successfully verified to the mail server in CF adminstrator and the mail server works for ASP forms. All the variables below are defined in the form.

subject="You have received an eCard from #sender#"
First try sending a simple text only message with no attachments to yourself to see if the mail server is even allowing you to relay from it like people have suggested above.

<cfmail to="" from="" subject="testing if email is working">
Hello World!

If that works then you know it's probably a problem with the server allowing attachments...
subject="testing if email is working"
password = "yourpwd"
username = "you">

you may also want to try to explicitly specify server pwd and uname

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
semerjAuthor Commented:
Mail: 'testing if email is working' From:'' To:'' was successfully sent using ...

It worked.
Okay, that's a good start.  Have you tried using a <cftry> and <cfcatch> to see if an error is being generated?

Try putting this around your code and see if an error message is shown at the time the CFMAIL tag is called:



<cfcatch type="any">


The error suggests to me that either the To="" or From="" email addresses are not valid.  I've had mixed results with using a fake From="" address...

If you are using a hosting company it might be a good idea to check with them and see if they have any restrictions on attachments or attachment size too.
Whoops.  You might want to include a <cfabort> tag inside the <cfcatch> tag in case you are redirecting to another page after the email is sent...

<cfcatch type="any">


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.