Jump to content

[SOLVED] Ajax Newsletter, got it working, just one little problem...


JohnnieQ

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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();
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.