Jump to content

registration page not sending email!


Glenskie

Recommended Posts

ok well my registration page is supposed to send out an email so the user can activate his or her account , but it will not send! i am using xampp for my local webhost and my php.ini settings are

 

[mail function]

; For Win32 only.

; http://php.net/smtp

SMTP = relay.jangosmtp.net

; http://php.net/smtp-port

smtp_port = 587

 

; For Win32 only.

; http://php.net/sendmail-from

sendmail_from = activate.social@gmail.com

sendmail_path="\"C:\xampp\sendmail\sendmail.exe\"-t

 

and my sendmail.ini is

 

account Gmail

tls on

tls_certcheck off

host relay.jangosmtp.net

from activate.social@gmail.com

auth on

user activate.social@gmail.com

password mypassword

 

port 587

 

account default : Gmail

 

 

and now here is my php script that sends the mail but it wont send , the reason i put those .ini files in here is because that is what xampp uses to send mail.

here is the php script

<?php
$to = "$email1";// which is established further up on the script which is to big!

    $from = 'activate.social@gmail.com'; // same email used in php.ini and sendmail.ini but wont send
    $subject = 'Complete Your ' . $dyn_www . ' Registration';
    //Begin HTML Email Message
    $message = "Hi $username,

   Complete this step to activate your login identity at $dyn_www

   Click the line below to activate when ready

   http://$dyn_www/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1 
   Password: $pass1

   See you on the site!";
   //end of message
$headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers); // supposed to send but wont
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.