Susagittikasusa
Susagittikasusa

Reputation: 49

E-mail Responder

Hey, I have people registering on my website with their e-mail id. What is the best way to automatically send them e-mails as soon as they register?

Upvotes: 0

Views: 132

Answers (2)

BenM
BenM

Reputation: 53198

<?php

$emailAddress = $_REQUEST['emailFieldName'];
$name = $_REQUEST['nameField'];
$subject = 'Welcome to Website Name';
$fromAddress = '[email protected]';

$messageBody = 'Dear ' . $name;
$messageBody .= "\n" . 'Welcome to my Forum (or whatever)....';
$messageBody .= 'Add more lines using $messageBody .='; 

mail($emailAddres, $subject, $messageBody, 'From: ' . $fromAddress);
?>

Upvotes: 1

DJ Quimby
DJ Quimby

Reputation: 3699

Read their email address from the proper post field when your registration form is submitted. Create an email object and send it to the email address. It's likely that no one will just hand you code unless you actually give it a shot yourself.

Upvotes: 0

Related Questions