php - Gmail doesn't accept emails that contains links -


i using phpmailer send emails contain activation codes people have signed on website. worked fine yahoo! not gmail. there no errors in php script. looked okay. tried remove links email text , replaced random string 'rrrrrrr' , worked, received mail in mailbox. happens gmail. knows how overcome problem? also, hosting website on hostinger.com testing phpmailer on localhost using wampserver

edit: website http://www.pascal-tweaks.esy.es/ don't think looks spam link. found emails in spam folder, must 2 days ago working fine gmail , receiving them in mailbox. thought maybe decided not trust links that? still want solution because don't want website's users bother going spam folder :(

here code, $email_sent true :

$toemail = $_session['toemail']; $nom = $_session['name']; $email_color = $_session['email_color']; $email_theme = $_session['email_theme']; $index = $_session['index']; $code = $_session['code'];  $smtphost = 'smtp.topnet.tn'; $smtpport = 25;   $dom = 'http://www.mydomain.esy.es';  $from = 'mydomain@support.com'; $fromname = 'mywebsite'; $subj = 'signing in'; $greating = 'thank registering!'; $htmlbody =      '<!doctype html>     <html>         <head>             <meta charset="utf-8"/>             <title>' . $greating . '</title>         </head>         <body style="margin:0;padding:10px 0;">             <div style="width:450px;height:450px;max-height:450px;border:1px solid ' . $email_color . ';border-radius:260px;background-image:url(\'' . $dom . '/cssjs/theme' . $email_theme . '.jpg\');background-size:cover;box-shadow:0 0 22px 2px ' . $email_color . ';margin:30px auto;overflow:hidden;">                 <div style="height:78px;max-height:78px;width:350px;color:' . $email_color . ';margin:60px auto 54px auto;text-align:center;font-family:\'cordia new\', \'aparajita\';text-shadow:1px 1px 4px gray;">                     <div style="font-size:52px;height:52px;max-height:52px;"><a style="text-decoration:none;color:' . $email_color . ';" href="' . $dom . '" target="_blank">my website name</a></div>                     <div style="font-size:26px;height:26px;max-height:26px;">welcome website!</div>                 </div>                 <div style="text-shadow:0 0 1px gray;background-image:url(\'' . $dom . '/cssjs/t_white.png\');width:429;height:238px;border-radius:8px 8px 260px 260px;padding:10px;font-family:\'cordia new\', \'aparajita\';">                     <div style="margin:15px auto;font-size:22px;line-height:22px;text-align:center;width:400px;">' . $greating . ' <br/>' . $nom . ' !</div>                     <div style="margin:15px auto;font-size:19px;line-height:19px;text-align:center;width:400px;">in order activate account, must follow link : <a href="' . $dom . '/activate.php?d=' . $index . '" target="_blank">' . $dom . '/activate_account</a><br/>your activation code :<br/>' . $code . '</div>                 </div>             </div>         </body>     </html>'; $altbody =  $greating . ' ' . $nom . ' !' . "\r\n" .             'in order activate account, must follow link  :' . "\r\n" .             'activation link : ' . $dom . '/activate.php?d=' . $index . "\r\n" .             'activation code : ' . $code;  require_once ($webdir . '/phpmailer-master/phpmailerautoload.php'); $activation_mail = new phpmailer;  $activation_mail->issmtp(); $activation_mail->host = $smtphost; $activation_mail->port = $smtpport;  $activation_mail->from = $from; $activation_mail->fromname = $fromname; $activation_mail->setfrom($from, $fromname); $activation_mail->addaddress($toemail); $activation_mail->addreplyto($from, $fromname); $activation_mail->ishtml(true); $activation_mail->charset = 'utf-8';  $activation_mail->subject = $subj; $activation_mail->body = $htmlbody; $activation_mail->altbody = $altbody;  if($activation_mail->send()){     $email_sent = true; } else{     $email_sent = false; } 

1.) website http://www.pascal-tweaks.esy.es/ hosted on free domain provider..i think 1 of reason receiving mail in spam folder.. 2.) try when post site on facebook wall or message ll ask security check or captcha.. perhaps because of gmail not show link .. thanks..


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -