Email confirmation


How would I email a confirmation of a registration if someone registered for a site using php and html. Data is stored in MYsql on wamp server…

Any info is greatly appreciated…

Here’s a tutorial that goes through the process…

Excellent. Thanks :slight_smile:

That tutorial uses deprecated (obsolete) code. It was written in 2009.

Is there an easier way to do it?

I ahve all the data saved in the DB already just need to send a confirmation after registration…

Download the PDO Bumpstart Database I have provided. There is a very simple form to email in it.!

Brilliant. Thanks…

how do I use the mail part. It’s showing errors

$success = mail($mailto, $emailSubject, $body, $headers);

The mail function doesnt work like that. It needs to be like:

[php]mail($mailto, $emailSubject, $body, $headers);[/php]

I got it. I needed to set an smtp mail server in php.ini file as I was using localhost

For local testing you can use smtp for dev or Papercut.

Will this email multiple email types?

Not sure what you mean. They do not send emails out. It only sends it to the app itself to test mail functions

I have it sending emails to people who register with a gmail and my college email.

You’re trying to email multiple recipients? If so, you can just separate each email address by a comma like so:

[php]$to = '[email protected], [email protected]';[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service