Jump to content
The Uniform Server Community



Recommended Posts

For class I have to make a "newsletter signup form". It didn't actually have to send an e-mail, but the bonus was to make it send an e-mail if the person submitted a form to remove themselves from the database. I am not really sure how to hook it up to the UniServer SMTP or anything, nor do I know how to hook it up to any other mail server. The code I have for now is:

$to = $email;
$subject = "You left!";
$body = "You have successfully removed yourself from our database, you treacherous scum.";
if (mail($to, $subject, $body)) {
  echo("An e-mail has been sent confirming your removal from our database.");
 } else {
  echo("<em>failure sending e-mail</em>");

The e-mail variable is defined earlier in the script. It is retrieved from the database.

Link to comment
Share on other sites

Join the conversation

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...