Sending email upon registration
Moderator: General Moderators
Sending email upon registration
I would like to include an auto email function upon each successful registration which include the username n password.
Would like to know how should i start with this.
Thanks
Would like to know how should i start with this.
Thanks
Code: Select all
mail ($to, $subject, $content, $headers, "myemail@myhost.com");One more thing im not too sure bout is where shud i include this function?My page function as after click the submit button where the code is as following :
Code: Select all
<?PHP if($veri=="false"){ ?>
<input type="submit" name="submit" value="View First">
<?PHP } else { ?>
<input type="submit" name="submit" value="Submit">
<?PHP } ?>
<input name="RESET" type="RESET" value="Clear"></td>
</tr>Code: Select all
<?PHP require('includes/headbanner.php'); ?>
<div class="mlm" align="center"><?PHP echo("Member "); echo($country_code); echo($nric); echo(" had been registered successfully.<br>"); ?></div>
<div class="mlm" align="center"><?PHP echo("<a target=_blank href=invoice.php?membercode=$country_code$nric&invoiceid=$invoice_id>View invoice</a>"); ?></div>
<?PHP require('includes/bottombanner.php'); ?>
<?PHP } ?>Code: Select all
Member MY112233 had been registered successfully.
Mail sent to uremail@hotmail.com
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\domain\gv\mlm\sign_up_03.php on line 704I inserted the mail function n get this error message,is it the version of php im using not compatible or the config prob?
if your using windows don't worry about the sendmail_path;
if you don't have an email account that you can pilfer the SMTP server from you will have to find and download one from the web to run on your local machine.
the from can be set in either your mail() or you can set it in your php.ini file as a default if you want.
if you don't have an email account that you can pilfer the SMTP server from you will have to find and download one from the web to run on your local machine.
the from can be set in either your mail() or you can set it in your php.ini file as a default if you want.
A solution, register at my website http://pythonweb.com/jshpro2
and then go to
http://pythonweb.com/jshpro2/services/
Activate the email service
It will get the job done because I allow you to specify a URL to foward to after sending the email so your users would not notice they even left your site!
it is made for processing form mail but you could just as easily send a header("location:script?data=stuff&etc........");
Theres example usage when you sign up on my site.
An alternative would be to manually connect to some one else's SMTP server, like connect to hotmails SMTP server and send mails useing that I guess.
and then go to
http://pythonweb.com/jshpro2/services/
Activate the email service
It will get the job done because I allow you to specify a URL to foward to after sending the email so your users would not notice they even left your site!
it is made for processing form mail but you could just as easily send a header("location:script?data=stuff&etc........");
Theres example usage when you sign up on my site.
An alternative would be to manually connect to some one else's SMTP server, like connect to hotmails SMTP server and send mails useing that I guess.
Basically you would send the header location to http://mysite.com/something/script.php? ... ge=message here
Then my script sends the email to someone@hotmail.com then fowards you back to your website.. try it out then youll understand
Then my script sends the email to someone@hotmail.com then fowards you back to your website.. try it out then youll understand