dhapp
Feb 6 2009, 10:44 AM
I have a button on a form with code behind to send an email. It works fine on my machine but not for the customer.
Here is the line of code that is causing the problem: EmailAddress = Me.ContactPerson & " [" & Me.ContactPersonEmail & "]"
This produces an address line like Joe Smith [jsmith@xyz.com] in the email client (Outlook).
The client is getting mail to bounce back with the following message: Host unknown (Name server: xyz.com]: host not found)
Apparently the mail server is reading the ] as part of the server name.
If I use the same application I do not get the bounce backs. I suspect this is an issue with my customers' email service.
Is there a way to write the code to avoid the problem?
Doug Steele
Feb 6 2009, 12:43 PM
I believe all you need is
EmailAddress = Me.ContactPersonEmail
JVanKirk
Feb 6 2009, 12:44 PM
What about just ditching the contact person name and just using the email address?
JVanKirk
Feb 6 2009, 12:45 PM
yeah..what Doug said LOL..glad we agree
dhapp
Feb 6 2009, 01:15 PM
Doug, Jason,
Your answer is functional but less aesthetically pleasing. I may need to resort to that if the problem persists.
Thanks very much.
dhapp
Feb 8 2009, 12:02 PM
I did some research on this topic and found that wrapping an email address in square brackets [ ] works on some email systems, but not all.
Wrapping an email address in chevrons < > is universally accepted.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.