Jump to content
xt:Commerce Community Forum

Spam E-Mail: Spamverdacht bei einer Bestellung


schafa3

Recommended Posts

Wenn ich in meinem Shop etwas bestelle, wird die Bestellbestätigung die automatisch verschickt wird bei meinem GMX Account als Spam E-Mail gewertet.

Wieso ist das so und was ich kann ich tun damit die E-Mail nicht als Spam gewertet wird?

So sieht bei mir momentan der E-Mail Betreff aus:

*** GMX Spamverdacht *** Your order Nr:3 / Sonntag, 22. Juni 2008

Link to comment
Share on other sites

  • 8 months later...

GMX.de mag die funktion AddBCC nicht.

Anstatt 1ne E-Mail an 2 zu verschicken , schicke ich jetzt 2 E-Mail's an 2 E-Mail Adressen.

Und bei der Forward E-Mail hab ich als Absender meine feste E-Mail Adresse ([email protected]), und nicht die Absender E-Mail Adresse aus dem Formular.

Hier die korekte Verzion ;)

File: xtcommerce/inc/xtc_php_mail.inc.php funktion: xtc_php_mailer


function xtc_php_mail($from_email_address, $from_email_name, $to_email_address, $to_name, $forwarding_to, $reply_address, $reply_address_name, $path_to_attachement, $path_to_more_attachements, $email_subject, $message_body_html, $message_body_plain) {

	global $mail_error;


	$mail = new PHPMailer();

	$mail->PluginDir = DIR_FS_DOCUMENT_ROOT.'includes/classes/';


	if (isset ($_SESSION['language_charset'])) {

		$mail->CharSet = $_SESSION['language_charset'];

	} else {

		$lang_query = "SELECT * FROM ".TABLE_LANGUAGES." WHERE code = '".DEFAULT_LANGUAGE."'";

		$lang_query = xtc_db_query($lang_query);

		$lang_data = xtc_db_fetch_array($lang_query);

		$mail->CharSet = $lang_data['language_charset'];

	}

	if ($_SESSION['language'] == 'german') {

		$mail->SetLanguage("de", DIR_WS_CLASSES);

	} else {

		$mail->SetLanguage("en", DIR_WS_CLASSES);

	}

	if (EMAIL_TRANSPORT == 'smtp') {

		$mail->IsSMTP();

		$mail->SMTPKeepAlive = true; // set mailer to use SMTP

		$mail->SMTPAuth = SMTP_AUTH; // turn on SMTP authentication true/false

		$mail->Username = SMTP_USERNAME; // SMTP username

		$mail->Password = SMTP_PASSWORD; // SMTP password

		$mail->Host = SMTP_MAIN_SERVER.';'.SMTP_Backup_Server; // specify main and backup server "smtp1.example.com;smtp2.example.com"

	}


	if (EMAIL_TRANSPORT == 'sendmail') { // set mailer to use SMTP

		$mail->IsSendmail();

		$mail->Sendmail = SENDMAIL_PATH;

	}

	if (EMAIL_TRANSPORT == 'mail') {

		$mail->IsMail();

	}


	if (EMAIL_USE_HTML == 'true') // set email format to HTML

		{

		$mail->IsHTML(true);

		$mail->Body = $message_body_html;

		// remove html tags

		$message_body_plain = str_replace('<br />', " \n", $message_body_plain);

		$message_body_plain = strip_tags($message_body_plain);

		$mail->AltBody = $message_body_plain;

	} else {

		$mail->IsHTML(false);

		//remove html tags

		$message_body_plain = str_replace('<br />', " \n", $message_body_plain);

		$message_body_plain = strip_tags($message_body_plain);

		$mail->Body = $message_body_plain;

	}


	$mail->From = $from_email_address;

	$mail->Sender = $from_email_address;

	$mail->FromName = $from_email_name;

	$mail->AddAddress($to_email_address, $to_name);

	if ($forwarding_to != '')

		//$mail->AddBCC($forwarding_to);

	$mail->AddReplyTo($reply_address, $reply_address_name);


	$mail->WordWrap = 50; // set word wrap to 50 characters

	//$mail->AddAttachment($path_to_attachement);                     // add attachments

	//$mail->AddAttachment($path_to_more_attachements);               // optional name                                          


	$mail->Subject = $email_subject;	


	if (!$mail->Send()) {

		echo "Message was not sent <p>";

		echo "Mailer Error: ".$mail->ErrorInfo;

		exit;

	}








	// 2te mail

	if($forwarding_to!=""){

	$mailforward = new PHPMailer();

	$mailforward->PluginDir = DIR_FS_DOCUMENT_ROOT.'includes/classes/';


	if (isset ($_SESSION['language_charset'])) {

		$mailforward->CharSet = $_SESSION['language_charset'];

	} else {

		$lang_query = "SELECT * FROM ".TABLE_LANGUAGES." WHERE code = '".DEFAULT_LANGUAGE."'";

		$lang_query = xtc_db_query($lang_query);

		$lang_data = xtc_db_fetch_array($lang_query);

		$mailforward->CharSet = $lang_data['language_charset'];

	}

	if ($_SESSION['language'] == 'german') {

		$mailforward->SetLanguage("de", DIR_WS_CLASSES);

	} else {

		$mailforward->SetLanguage("en", DIR_WS_CLASSES);

	}

	if (EMAIL_TRANSPORT == 'smtp') {

		$mailforward->IsSMTP();

		$mailforward->SMTPKeepAlive = true; // set mailer to use SMTP

		$mailforward->SMTPAuth = SMTP_AUTH; // turn on SMTP authentication true/false

		$mailforward->Username = SMTP_USERNAME; // SMTP username

		$mailforward->Password = SMTP_PASSWORD; // SMTP password

		$mailforward->Host = SMTP_MAIN_SERVER.';'.SMTP_Backup_Server; // specify main and backup server "smtp1.example.com;smtp2.example.com"

	}


	if (EMAIL_TRANSPORT == 'sendmail') { // set mailer to use SMTP

		$mailforward->IsSendmail();

		$mailforward->Sendmail = SENDMAIL_PATH;

	}

	if (EMAIL_TRANSPORT == 'mail') {

		$mailforward->IsMail();

	}


	if (EMAIL_USE_HTML == 'true') // set email format to HTML

		{

		$mailforward->IsHTML(true);

		$mailforward->Body = $message_body_html;

		// remove html tags

		$message_body_plain = str_replace('<br />', " \n", $message_body_plain);

		$message_body_plain = strip_tags($message_body_plain);

		$mailforward->AltBody = $message_body_plain;

	} else {

		$mailforward->IsHTML(false);

		//remove html tags

		$message_body_plain = str_replace('<br />', " \n", $message_body_plain);

		$message_body_plain = strip_tags($message_body_plain);

		$mailforward->Body = $message_body_plain;

	}


	$mailforward->From = '[email protected]';

	$mailforward->Sender = $from_email_address;

	$mailforward->FromName = $from_email_name;

	$mailforward->AddAddress($forwarding_to);

	if ($forwarding_to != '')

		//$mailforward->AddBCC($forwarding_to);

	$mailforward->AddReplyTo($reply_address, $reply_address_name);


	$mailforward->WordWrap = 50; // set word wrap to 50 characters

	//$mailforward->AddAttachment($path_to_attachement);                     // add attachments

	//$mailforward->AddAttachment($path_to_more_attachements);               // optional name                                          


	$mailforward->Subject = $email_subject;	


	if (!$mailforward->Send()) {

		echo "Message was not sent <p>";

		echo "Mailer Error: ".$mailforward->ErrorInfo;

		exit;

	}

	}






}

Dank dem AddReplyTo funktioniert es mit dem antworten der E-Mail immer noch :)

Link to comment
Share on other sites

GANZ wichtig, die .jpg datei muss im Hauptverzeichnis von xtcommerce liegen.

Sonst wird das Bild nicht als Anhang mitgesendet und kann nicht angezeigt werde.

siehe $mail->AddEmbeddedImage('logo.jpg', "my-attach", "logo.jpg"); ...


<?php

function xtc_php_mail($from_email_address, $from_email_name, $to_email_address, $to_name, $forwarding_to, $reply_address, $reply_address_name, $path_to_attachement, $path_to_more_attachements, $email_subject, $message_body_html, $message_body_plain) {

	global $mail_error;


	$mail = new PHPMailer();

	$mail->PluginDir = DIR_FS_DOCUMENT_ROOT.'includes/classes/';



	//adding the logo	//HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/logo.jpg'

	$mail->AddEmbeddedImage('logo.jpg', "my-attach", "logo.jpg");

	$message_body_html ='<img alt="PHPMailer" src="cid:my-attach">'.$message_body_html;


	if (isset ($_SESSION['language_charset'])) {

		$mail->CharSet = $_SESSION['language_charset'];

	} else {

		$lang_query = "SELECT * FROM ".TABLE_LANGUAGES." WHERE code = '".DEFAULT_LANGUAGE."'";

		$lang_query = xtc_db_query($lang_query);

		$lang_data = xtc_db_fetch_array($lang_query);

		$mail->CharSet = $lang_data['language_charset'];

	}

	if ($_SESSION['language'] == 'german') {

		$mail->SetLanguage("de", DIR_WS_CLASSES);

	} else {

		$mail->SetLanguage("en", DIR_WS_CLASSES);

	}

	if (EMAIL_TRANSPORT == 'smtp') {

		$mail->IsSMTP();

		$mail->SMTPKeepAlive = true; // set mailer to use SMTP

		$mail->SMTPAuth = SMTP_AUTH; // turn on SMTP authentication true/false

		$mail->Username = SMTP_USERNAME; // SMTP username

		$mail->Password = SMTP_PASSWORD; // SMTP password

		$mail->Host = SMTP_MAIN_SERVER.';'.SMTP_Backup_Server; // specify main and backup server "smtp1.example.com;smtp2.example.com"

	}


	if (EMAIL_TRANSPORT == 'sendmail') { // set mailer to use SMTP

		$mail->IsSendmail();

		$mail->Sendmail = SENDMAIL_PATH;

	}

	if (EMAIL_TRANSPORT == 'mail') {

		$mail->IsMail();

	}


	if (EMAIL_USE_HTML == 'true') // set email format to HTML

		{

		$mail->IsHTML(true);

		$mail->Body = $message_body_html;

		// remove html tags

		$message_body_plain = str_replace('<br />', " \n", $message_body_plain);

		$message_body_plain = strip_tags($message_body_plain);

		$mail->AltBody = $message_body_plain;

	} else {

		$mail->IsHTML(false);

		//remove html tags

		$message_body_plain = str_replace('<br />', " \n", $message_body_plain);

		$message_body_plain = strip_tags($message_body_plain);

		$mail->Body = $message_body_plain;

	}


	$mail->From = $from_email_address;

	$mail->Sender = $from_email_address;

	$mail->FromName = $from_email_name;

	$mail->AddAddress($to_email_address, $to_name);

	if ($forwarding_to != '')

		//$mail->AddBCC($forwarding_to);

	$mail->AddReplyTo($reply_address, $reply_address_name);


	$mail->WordWrap = 50; // set word wrap to 50 characters

	//$mail->AddAttachment($path_to_attachement);                     // add attachments

	//$mail->AddAttachment($path_to_more_attachements);               // optional name                                          


	$mail->Subject = $email_subject;	


	if (!$mail->Send()) {

		echo "Message was not sent <p>";

		echo "Mailer Error: ".$mail->ErrorInfo;

		exit;

	}








	// 2te mail

	if($forwarding_to!=""){

	$mailforward = new PHPMailer();

	$mailforward->PluginDir = DIR_FS_DOCUMENT_ROOT.'includes/classes/';


	//adding the logo

	$mailforward->AddEmbeddedImage('logo.jpg', "my-attach", "logo.jpg");



	if (isset ($_SESSION['language_charset'])) {

		$mailforward->CharSet = $_SESSION['language_charset'];

	} else {

		$lang_query = "SELECT * FROM ".TABLE_LANGUAGES." WHERE code = '".DEFAULT_LANGUAGE."'";

		$lang_query = xtc_db_query($lang_query);

		$lang_data = xtc_db_fetch_array($lang_query);

		$mailforward->CharSet = $lang_data['language_charset'];

	}

	if ($_SESSION['language'] == 'german') {

		$mailforward->SetLanguage("de", DIR_WS_CLASSES);

	} else {

		$mailforward->SetLanguage("en", DIR_WS_CLASSES);

	}

	if (EMAIL_TRANSPORT == 'smtp') {

		$mailforward->IsSMTP();

		$mailforward->SMTPKeepAlive = true; // set mailer to use SMTP

		$mailforward->SMTPAuth = SMTP_AUTH; // turn on SMTP authentication true/false

		$mailforward->Username = SMTP_USERNAME; // SMTP username

		$mailforward->Password = SMTP_PASSWORD; // SMTP password

		$mailforward->Host = SMTP_MAIN_SERVER.';'.SMTP_Backup_Server; // specify main and backup server "smtp1.example.com;smtp2.example.com"

	}


	if (EMAIL_TRANSPORT == 'sendmail') { // set mailer to use SMTP

		$mailforward->IsSendmail();

		$mailforward->Sendmail = SENDMAIL_PATH;

	}

	if (EMAIL_TRANSPORT == 'mail') {

		$mailforward->IsMail();

	}


	if (EMAIL_USE_HTML == 'true') // set email format to HTML

		{

		$mailforward->IsHTML(true);

		$mailforward->Body = $message_body_html;

		// remove html tags

		$message_body_plain = str_replace('<br />', " \n", $message_body_plain);

		$message_body_plain = strip_tags($message_body_plain);

		$mailforward->AltBody = $message_body_plain;

	} else {

		$mailforward->IsHTML(false);

		//remove html tags

		$message_body_plain = str_replace('<br />', " \n", $message_body_plain);

		$message_body_plain = strip_tags($message_body_plain);

		$mailforward->Body = $message_body_plain;

	}


	$mailforward->From = '[email protected]';

	$mailforward->Sender = $from_email_address;

	$mailforward->FromName = $from_email_name;

	$mailforward->AddAddress($forwarding_to);

	if ($forwarding_to != '')

		//$mailforward->AddBCC($forwarding_to);

	$mailforward->AddReplyTo($reply_address, $reply_address_name);


	$mailforward->WordWrap = 50; // set word wrap to 50 characters

	//$mailforward->AddAttachment($path_to_attachement);                     // add attachments

	//$mailforward->AddAttachment($path_to_more_attachements);               // optional name                                          


	$mailforward->Subject = $email_subject;	


	if (!$mailforward->Send()) {

		echo "Message was not sent <p>";

		echo "Mailer Error: ".$mailforward->ErrorInfo;

		exit;

	}

	}






}

?>

Link to comment
Share on other sites

Archived

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

×
  • Create New...