Jump to content

PHP Email Script


mcmuney

Recommended Posts

I'm using php script that sends email notifications to members when they perform certain functions. But most of the emails are going to the spam/junk folder. I've checked my ip, which is not banned or black listed anywhere. I've been told that php itself can be triggered as spam if not formatted/coded correctly. Below is one of the scripts that I'm using, is this not coded properly? What's causing it to trigger as spam?

 

			//start send email to receiver

		$from = "<email address here>";
		$to =$txt_scm_email; 

		include("mailClass.php");
		$mail= New mailClass("mailParam.php");

		$fname=$_SESSION['social_mem_fname'];

		$txt_scm_firstname=$db->get_field('sc_member',scm_firstname,scm_mem_id,$scm_mem_id);

		$mail->mailParam["UserFirstName"]=$txt_scm_firstname;

		$mail->mailParam["SiteName"]=$db->sitepath;


		//for server
		$mail->mailParam["SiteLink"]="<a href=site url here>
		site url here</a>";

		$mail->setmail("New Message");

		$mail->mail_subject=$fname." has sent you a new message";

		$mail->mailto($to);

		$mail->mailfrom($from);

		$mail->mail_send("");

	}

	//end send email to receiver

Link to comment
https://forums.phpfreaks.com/topic/58374-php-email-script/
Share on other sites

:-\ Well if the script that handles the email sends a "bulk mail" to more than three addresses at a time then it will be marked as spam ny most e-mail clients. The mail has to be sent individualy to avoid the spam folder. thhis shouldn't be too daunting of a task. Hope I helped :)

Link to comment
https://forums.phpfreaks.com/topic/58374-php-email-script/#findComment-289488
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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