Closed RomitGandhi07 closed 3 years ago
First, if you're trying to spoof the sending address, that is up to the SMTP server, not the client.
Second, it's bad manners to request help in other issues.
@dancek Sorry for that, I deleted that comment.
I'm not trying to spoof but the issue is my email id is demo@gmail.com and in the Gmail, I have set my name as ABC XYZ but in the recipient side it is displaying email address instead of name.
Does ABC XYZ <demo@gmail.com>
work?
(mail/send-message {:host "smtp.gmail.com"
:user "democera@gmail.com"
:pass "XXX"
:port 587
:tls true}
{:from "democera@gmail.com"
:to "XXX"
:subject "Final Demo"
:body [{:type "text/html"
:content "<font color=\"red\">Welcome</font>"}]})
This is the code that I have written, can you tell me where I should change?
You would use it with the from:
key, for example: https://github.com/drewr/postal/blob/506072a314890f274c0d0921b05dbfa35e1b2665/test/postal/test/message.clj#L38
This was a helpful thread. I had thought the only way to accomplish this was to create an InternetAddress
and use the constructor InternetAddress(String address, String personal)
. I didn't realize the that you could use the form Personal <email>
. And it does not seem like we can pass in an InternetAddress
as the from
this is a nice way to accomplish this. Thank you.
Glad it was helpful @dpsutton 👍
Eg: I'm sending an email using abc@gmail.com and I want that the recipient will receive the email by XYZ name but currently they are getting an email with name either abc or email id itself.
Is there any way to specify a specific name? @drewr