Name des Empfängers in Emails

  • In den Bestätigungsmails für eine Bestellung und ich glaube auch in anderen Mails steht im "To"-Feld der Email kein Name drin. Heißt statt
    'Hans Meier' <hansmeier@xyz.tld>
    steht da lediglich
    hansmeier@xyz.tld

    Habs mir mal ein wenig angesehn. Versendet werden die Bestätigungsmails in /send_order.php.
    Hier die Betreffende Zeile mit ein paar Modifikationen zum Testen:

    Code
    // send mail to customer
     xtc_php_mail(EMAIL_BILLING_ADDRESS, 'from_name'.EMAIL_BILLING_NAME, 
    $order->customer['email_address'], 'to_name'.$order->customer['name'], '', 
    EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, $attachment1, 
    $attachment2, $order_subject, $html_mail, $txt_mail);</code>

    Den Text 'from_name' sowie 'to_name' habe ich zum Debuggen zugefügt.
    In er daraus resultierenden Bestätigungsmail an den Kunden taucht "from_name" mitsamt dem Absendernamen in der Absenderadresse auf. von "to_name" sowie dem Empfängernamen ist leider weit und breit nichts zu sehn.

  • Also an den Kunden geht folgendes raus:
    Von: Mail send by billing systems [info@shopname.de]
    An: info@testaccount.de

    Der Admin bekommt folgende Mail:
    Von: Vorname Nachname [info@testaccount.de]
    An: info@shopname.de

    So ist es doch auch richtig.

    Code
    // send mail to admin	xtc_php_mail($order->customer['email_address'], $order->customer['firstname'].' '.$order->customer['lastname'], EMAIL_BILLING_ADDRESS, STORE_NAME, EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'], $order->customer['firstname'].' '.$order->customer['lastname'], '', '', $order_subject, $html_mail, $txt_mail);
    Code
    // send mail to customer
    	xtc_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['email_address'], $order->customer['firstname'].' '.$order->customer['lastname'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, $attachment1, $attachment2, $order_subject, $html_mail, $txt_mail);
  • Zitat von kausch


    Also an den Kunden geht folgendes raus:
    Von: Mail send by billing systems [info@shopname.de]
    An: info@testaccount.de

    Der Admin bekommt folgende Mail:
    Von: Vorname Nachname [info@testaccount.de]
    An: info@shopname.de

    So ist es doch auch richtig.


    Na nicht wirklich.
    Richtig/besser wäre:
    Von: Mail send by billing systems [info@shopname.de]
    An: Vorname Nachname [info@testaccount.de]

    bzw.
    Von: Vorname Nachname [info@testaccount.de]
    An: Mail send by billing systems [info@shopname.de]

    Den fehlenden Empfängernamen wertet die Spamabwehr schonmal gerne als Netativkriterium. Zudem sieht das für den Kunden persönlicher aus.

    Dieser ist als Parameter von xtc_php_mail ja auch vorgesehen, sowie im konkreten Aufruf angegeben, nur scheinbar geht der irgendwo verloren.

  • Dann würde ich es einfach in der Zeile umstellen:

    Code
    // send mail to customer
    	xtc_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['firstname'].' '.$order->customer['lastname'], $order->customer['email_address'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, $attachment1, $attachment2, $order_subject, $html_mail, $txt_mail);
  • Zitat von kausch


    Dann würde ich es einfach in der Zeile umstellen:

    Code
    // send mail to customer
    	xtc_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['firstname'].' '.$order->customer['lastname'], $order->customer['email_address'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, $attachment1, $attachment2, $order_subject, $html_mail, $txt_mail);


    Sowas hatte ich ja auch probiert - daher mein Beispiel ganz oben. Das Problem ist: Der dritte Parameter von xtc_php_mail (nämlich der für den Empfängernamen) wird nach meiner Erkenntnis gänzlich ignoriert!