How to change senders email address in sendMail

When allowing our webclient customers to send out emails using sendMail, our email address shows as the sender instead of their email address. How can we change it so:

  1. Our customer’s email address is shown to the recipient as the sender
  2. Any reply sent to the email goes to our customer’s email address instead of to ours

Dean Westover
Choices Software, Inc.

What arguments do you use for sendMail? If you set your customers email address as the from address it should work as you described:

var success = plugins.mail.sendMail('to@example.com', 'Customer <mail@customer.com>', 'subject', msgText);

Thank you. Now it is working.

I think I had an illegal character in there. It looks like a comma in the customer name or a space after the name will break it.

Dean

When I put the solution on our server, emails sent with a “From” email address that does not match our server’s domain appeared not to be sent. However, upon further investigation I found that the problem was with the client Outlook 2003. Under the Outlook “Tools/Options/Junk Email” setting it appears that the default option is “Low: Move the most obvious junk email to the Junk Email folder”, which causes emails that are received with a “From” email address that does not match the senders domain to be placed in the Junk Email folder. Is it common for this to be the default setting?

The setting can be changed to “No automatic filtering” which stops the emails from being placed in the Junk Email folder, however, that does not seem like a very good solution. Is there another way to overcome this problem?

Dean Westover
Choices Software, Inc.