Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SMTP] Passing NOTIFY option to CURLOPT_MAIL_RCPT #8232

Closed
rperrot opened this issue Jan 6, 2022 · 3 comments
Closed

[SMTP] Passing NOTIFY option to CURLOPT_MAIL_RCPT #8232

rperrot opened this issue Jan 6, 2022 · 3 comments

Comments

@rperrot
Copy link

rperrot commented Jan 6, 2022

Hi,

is there a way to pass the NOTIFY option to the CURLOPT_MAIL_RCPT option ?

My goal is to achieve something like that :

RCPT TO: <foo@bar> NOTIFY=SUCCESS,FAILURE

If I pass the option directly after my recipient, there's a bracket that is inserted at the end, that cause an issue with the SMTP server.

RCPT TO:<foo@bar> NOTIFY=SUCCESS,FAILURE>

In my code, I created the curl_slist and for my only recipient, I set a string that already contains a bracket. For instance something like that :

curl_slist_append( recipients, "<foo@bar> NOTIFY=SUCCESS,FAILURE" );

@bagder bagder added the SMTP label Jan 6, 2022
@bagder
Copy link
Member

bagder commented Jan 6, 2022

We could perhaps extend the handling of the address and if the user-provided address starts with a < we could not add the <> pair but assume that the user provides them properly. It would make it possible for an application to provide such address lines...

@rperrot
Copy link
Author

rperrot commented Jan 7, 2022

That would be fine for me.

@bagder
Copy link
Member

bagder commented Jan 7, 2022

Actually, that will not work since we already do magic on the string when provided with or without <. We would have to invent some other means of saying "use this full string exactly as provided". Maybe prefix the string with another "magic" letter that cannot otherwise legally be the first letter of a valid RCPT TO line? I suppose @ or > could work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants