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