Sending on Behalf Of
Hi there,
Is it possible for postal to send messages on behalf of other users?
I.e; when Campaign Monitor sends an email, it shows something like:

So say I have domain.com and my user has [email protected], I want to send an email on behalf of them as such. Is that possible to do with Postal?
Yes you can, you have to configure the postal mail server to be able to send from any sender, and be sure to add the "sender" header to your emails from your client. For example like this. https://github.com/atech/postal/issues/131#issuecomment-301752362
What about incoming mails? I have setup mx record correctly but still unable to recive email. m getting server token invalid error whenever try to send email from gmail to my postal server
@johnLeads I think you're having a different issue to what I'm trying to achieve here. Please open a separate issue.
@afanjul Thanks for that. I've set it up, and send in the "Sender" header, but get the following error when I try to send:
Postal::SendError: [UnauthenticatedFromAddress] The From address is not authorised to send mail from this server
I'm using the postal-ruby gem to send this.
The from email is set as [email protected] and the sender is set as my domain. Is this the correct way to set it up?
Postal.send_message do |m|
m.from pr.creator_user.firstname + " " + pr.creator_user.lastname + "<" + pr.creator_user.email + ">"
# m.reply_to pr.creator_user.email
m.header "Sender", "[email protected]"
m.to r.email
m.subject "[Rally Starter] " + pr.title
m.plain_body pr.content
end
@catphish is correct. No equals needed.
That worked perfectly! Thanks guys :)