Email confirmation


#1

Hi,

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…


#2

Here’s a tutorial that goes through the process…


#3

Excellent. Thanks :slight_smile:


#4

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


#5

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…


#6

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

http://www.phphelp.com/forum/the-occasional-tutorial/beginners-pdo-bumpstart-code-use-it-now!


#7

Brilliant. Thanks…


#8

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

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

#9

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

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


#10

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


#11

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

http://smtp4dev.codeplex.com/

http://papercut.codeplex.com/


#12

Will this email multiple email types?


#13

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


#14

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


#15

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

[php]$to = 'email1@gmail.com, email2@gmail.com';[/php]