deep958 Posted June 15, 2017 Posted June 15, 2017 (edited) i want to send email as user signup on my website . i use php code mail() function for this . but i dont know the settings of heliohost for that . plz help me this is my php code : if($status){$to="$email";$subject="[Together We] Activate your account";$message="Hello $username ! Please, confirm your registration by clicking link .Link is valid only for 1 day. Click to activate: http://localhost/New%20folder/confirmed.php?email=$email&vcode=$random"; $from="From : Together We <no-reply@togetherwe.heliohost.org>"; $sentmail=mail($to,$subject,$message,$from);} I want to use my gmail account for sending and receiving emails because i dont know email properties of heliohost Edited June 15, 2017 by deep958
deep958 Posted June 16, 2017 Author Posted June 16, 2017 (edited) i used this site for my mail function . by checking status , its showing mail is send but i didnt receive any mail .am i need to change some heliohost settings??i got this error while sending mail ECDHE-RSA-AES128-GCM-SHA256:128 CV=yes: SMTP error from remote mail server after end of data: 550-5.7.1 [64.62.211.131 11] Our system has detected that this message is\n550-5.7.1 not RFC 5322 compliant:\n550-5.7.1 'From' header is missing.\ Edited June 16, 2017 by deep958
Krydos Posted June 16, 2017 Posted June 16, 2017 If you had read the link I posted there is an example of setting the from header:<?php $to = "somebody@example.com"; $subject = "My subject"; $txt = "Hello world!"; $headers = "From: webmaster@example.com" . "\r\n" . "CC: somebodyelse@example.com"; mail($to,$subject,$txt,$headers);
deep958 Posted June 16, 2017 Author Posted June 16, 2017 I changed $from to $headers, but still it's not working
deep958 Posted June 16, 2017 Author Posted June 16, 2017 if($status){ $to="$email"; $subject="[Together We] Activate your account"; $message="Hello $username ! Please, confirm your registration by clicking link .Link is valid only for 1 day. Click to activate: http://localhost/New%20folder/confirmed.php?email=$email&vcode=$random"; $headers="From : togetherweindia@gmail.com"; $sentmail=mail($to,$subject,$message,$headers); }
deep958 Posted June 16, 2017 Author Posted June 16, 2017 i removed all the spaces from $headers part but, still msg is not send
Krydos Posted June 16, 2017 Posted June 16, 2017 This works for me. <?php $to = "me@gmail.com"; $subject = "[Together We] Activate your account"; $message = "Hello world!"; $headers = "From: no-reply@krydos.heliohost.org\r\n"; mail($to,$subject,$message,$headers);
deep958 Posted June 17, 2017 Author Posted June 17, 2017 In $headers, you r using heliohost mail account, but I want my Gmail account in that place also.Thanks krydos, you r trying to solve my problem. $to = "divyansh.agg15@gmail.com";$subject = "[Together We] Activate your account";$message = "Hello world!";$headers = "From: deep958@togetherwe.heliohost.org\r\n"; $sentmail= mail($to,$subject,$message,$headers); i used this code but still not working
deep958 Posted June 17, 2017 Author Posted June 17, 2017 hurry!now my code runs . previous code work now . i dont know why it was not working yesterday , but today its working .Thank you krydos for helping me .you always help me but it goes into spam folder , do you know how to stop it from going into spam folder
Krydos Posted June 17, 2017 Posted June 17, 2017 Send an email to https://www.mail-tester.com/ and they will tell you exactly why your email is considered spam. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now