0

i am using php to create new newsletter user via api. With adding the user to the list the workflow for the DoubleOptIn, created in Sendinblue, gets started. After the confirmation of the user, i want to send an email to the user, but not via sendinblue. Instead i want to send the email from php. So, how can i catch the DOI Confirmation from the user to trigger my php email?

Thanks, Daniel

D.Schall
  • 53
  • 6
  • https://developers.sendinblue.com/reference/createdoicontact - you need to specify a `redirectionUrl` when creating the contact - _"URL of the web page that user will be redirected to after clicking on the double opt in URL."_ - so handle stuff in the script that triggers. – CBroe Apr 19 '23 at 06:19
  • @CBroe thanks, yes but this is a static url right? How do i know from which mailadress the call comes? in my php skript i need to know at least the mailadress from the user. – D.Schall Apr 19 '23 at 07:35
  • You specify it every time you create a new contact, so I don't see why it would have to be static. So append the email address (or some other identifying criterion, such as a user id from your database) as a query string parameter, then you will have it available when the user gets redirected back there. Only then everyone could manipulate this parameter - so you should secure it by adding a hash of the parameter value and a secret, so that you can verify that on the receiving end. – CBroe Apr 19 '23 at 07:39
  • @CBroe oh man, you're so right! Why i didn't think of it myself?! :D So, i want to call the php skript and also want to forward the user to a thank you page. So i make a forwarding in the php skript after i have done the things the skript should do right? – D.Schall Apr 19 '23 at 07:42
  • Or do both, sending of the email, and generation of the "thank you" output, in the same script. (Optional, just saying it doesn't necessarily need a redirect elsewhere.) – CBroe Apr 19 '23 at 08:21

0 Answers0