JohnnieQ Posted October 17, 2008 Share Posted October 17, 2008 Hello, First of all i am a big noob on PHP, MySQL, AJAX... After a lot of strugeling i finaly set up a database and made a Ajax Newsletter which i got from this site: http://www.roscripts.com/Ajax_newsletter_form-146.html# Now everything works, if you sign up you get the confirmation email, you confirm and your subscribed.. All good, except i would like to get a email too if someone subscribes, can this be done? The roscript site itself is not very helpfull... I uploaded the rar. file to Mediafire so you wont have to sign up for downloading it: http://www.mediafire.com/?sharekey=e3c2b5ab4eddb4bbd2db6fb9a8902bda I hope someone can help me with this! Thanks Quote Link to comment Share on other sites More sharing options...
F1Fan Posted October 17, 2008 Share Posted October 17, 2008 All you want to do is add yourself to the email? Just add your email address to the "to" part of your PHP mail() function. If you don't want the same email, but a different one, just do another mail() function if the first one was a success. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted October 17, 2008 Share Posted October 17, 2008 This should be moved to the PHP forum. All you want to do is add yourself to the email? Just add your email address to the "to" part of your PHP mail() function. Also, if you are going to add yourself to the same email they are getting, you might want to put yourself in the BCC header instead, so they don't see that you are getting it. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted October 17, 2008 Share Posted October 17, 2008 To elaborate I mean change this: <?php $headers = 'From: me@localhost.com'. "\r\n" . 'Reply-To: me@localhost.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); ?> to <?php $headers = 'From: me@localhost.com'. "\r\n" . 'Bcc: you@youremail.com' . "\r\n" . //Added this line 'Reply-To: me@localhost.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); ?> Quote Link to comment Share on other sites More sharing options...
F1Fan Posted October 17, 2008 Share Posted October 17, 2008 Also, if you are going to add yourself to the same email they are getting, you might want to put yourself in the BCC header instead, so they don't see that you are getting it. Ooh, good call. Quote Link to comment Share on other sites More sharing options...
JohnnieQ Posted October 17, 2008 Author Share Posted October 17, 2008 Thank you very much! works like a charm! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.