February 4, 201312 yr Newbies I'm running into a problem with specifying a "from" address that's different from the account information that I'm using to access the SMTP server. I've got a database that manages inbound inventory in three different locations. Whenever an item arrives in one branch, I want the database to notify the end-client, but I want to use the group e-mail address corresponding to which branch it arrived in ([email protected] or [email protected], for example). Neither of these are accounts with SMTP logins. Instead, I'd like to use a different e-mail address (one I'm using in a different database without any problems) to actually login and send the e-mails, but to send them with a different "from" address so that when the client responds, their response goes to the correct facility. Here's what my send code looks like: EmailConnectSMTP( "smtp.mycompany.com" ; "support%mycompany.com" ; "password" ) and EmailCreate( tblEmailsOutbound::emaEmailFrom ; tblEmailsOutbound::emaEmailTo ; tblEmailsOutbound::emaEmailSubject) and EmailSetBody( tblEmailsOutbound::emaEmailBody ; "html" ) and EmailSend and EmailDisconnect Every time I run this, I get the "invalid addresses" error, even though if I run isValidEmail on the field tblEmailsOutbound::emaEmailFrom I get a successful return. If I substitute "[email protected]" into the code for the "from" field, the e-mail fires off with no problems. I'm suspecting that this is a feature the plugin does not support, but I wanted to see if there was a set ReplyTo feature or something else I'm missing.
March 15, 201312 yr It looks like there is no way to set the ReplyTo field. with EmailCreate. I have a similar need to send work orders from a central address but have the customer Reply To the actual project manager. That would be a cool new feature.
November 2, 20169 yr I used the EmailSetHeader function to set a different Reply-To but it doesn't seem to be working. The Reply-To continues to just be the From Address. Can anyone confirm that is the correct function to set a different Reply-To?
November 2, 20169 yr 19 minutes ago, Jason Mundok said: I used the EmailSetHeader function to set a different Reply-To but it doesn't seem to be working. The Reply-To continues to just be the From Address. Can anyone confirm that is the correct function to set a different Reply-To? Does the SMTP server matter here? I have seen some strip some headers out, like gmail will only send from addresses that it is configured to work with.
November 2, 20169 yr 19 minutes ago, Jason Mundok said: I used the EmailSetHeader function to set a different Reply-To but it doesn't seem to be working. The Reply-To continues to just be the From Address. Can anyone confirm that is the correct function to set a different Reply-To? Does the SMTP server matter here? I have seen some strip some headers out, like gmail will only send from addresses that it is configured to work with.
November 2, 20169 yr I think that could be the issue. I was thinking that I used the EmailSetHeader before to do this successfully. I'm working with a client whose SMTP server has some limitations to avoid spam, so I'm thinking that could be it. Is EmailSetHeader the only way to set a different Reply-To with the plugin?
November 2, 20169 yr There is not currently another option for setting a 'Reply-To'. When you use EmailSetHeader, you are directly adding/changing the header that you pass in. So when you call that function you are doing something directly that would otherwise be done through some other function.
November 2, 20169 yr Thanks for the reply. I didn't think there was another function. I think the SMTP server must be stripping it out because I'm doing it correctly without any errors.
Create an account or sign in to comment