bluetiger9 / SmtpClient-for-Qt

An SMTP Client writen in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.
https://github.com/bluetiger9/SmtpClient-for-Qt/wiki
GNU Lesser General Public License v2.1
449 stars 226 forks source link

Unable to set Reply-To #141

Closed ChriswZeroOne closed 1 year ago

ChriswZeroOne commented 1 year ago

I am unable to figure out how to set the Reply-To. Is this even possible?

attila-tokes commented 1 year ago

I think you should be able to add a Reply-To address by setting a custom header on the MimeMessage:

MimeMessage message;
...
message.addCustomHeader("Reply-To: <your-reply-addr@example.com>");
ChriswZeroOne commented 1 year ago

Thanks, that worked perfectly for what I was trying to accomplish. Here's another question, what would be the best way to hook in a progress bar after the call to sendMail it shows in your examples to call waitForMailSent which does not return until completion or error. On Tuesday, July 18, 2023 at 09:03:02 AM PDT, Attila Tőkés @.***> wrote:

I think you should be able to add a Reply-To address by setting a custom header on the MimeMessage: MimeMessage message; ... message.addCustomHeader("Reply-To: @.***>");

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>