E-Mail's sind leer

  • 0 x
    9 Beiträge
    0 Hilfreiche Beiträge
    15. 05. 2012, 21:02

    Abend!

    Sowohl die Pn-Benachrichtigungs E-Mails als auch die Registrierungs-Mail ist in Outlook und auf t-online.de leer.
    Auf Gmx.net wurde 2 Zeilen angezeigt.(Ich kann nicht beurteilen ob auch hier was falsch ist oder das alles ist.)

    Betreff wird überall angezeigt.

    Hat jemand eine Lösung für diesen Bug?

    Gruß,
    Daniel


  • 1
  • 0 x
    9 Beiträge
    0 Hilfreiche Beiträge
    18. 05. 2012, 10:33

    Weis niemand etwas?
    Der E-Mail Versand ist auch nicht konstant. Man kommt eine, öfter keine.
    De Testmail im Installtool sendet konstant.

    Was ich noch vergessen habe: Das Forum ist ein mm_forum in der Version 1.9.1 ;)

    Gruß,
    Daniel

  • jvelletti jvelletti
    Padawan
    0 x
    53 Beiträge
    0 Hilfreiche Beiträge
    29. 05. 2012, 16:25

    Hi

    wenn GAR nichts verschikt wird, kann das unter anderem am Fehlenden oder falsch definierten "absender" liegen
    also den beiden typoscript definitionen:

    plugin.mm_forum_pi1.notifyingMail.sender_address = sinnvolles@deinne-domain.xx
    plugin.mm_forum_pi1.notifyingMail.sender = Name ohne komische UTF 8 Zeichen ..

    ansonsten aus dem Gedächtnis heraus: wird da nicht nur ein Plaintext email verschickt und evt. siehst du deshalb nichts ?

    bei uns klappt das nämlich problemlos aber ich hab auch die hjavealook komplett umgebaut .. siehe unten ...

    das nachfolgende ist auch nur bedingt anwendbar, da wir z.b. ein eigenes html Email Templete verwenden und auch eine Extension für die Signature integriert haben, aber vielleicht ist das eine Anregung zur Lösung

    Grüße
    Jörg

    1. /**
    2.   * Sends an e-mail to users who have subscribed a certain topic.
    3.   *
    4.   * @param int $topicId The UID of the topic about which the users are
    5.   * to be alerted.
    6. * @param tx_mmforum_pi1 $forumObj An instance of the tx_mmforum_pi1 class.
    7.   * @return void
    8.   */
    9. function notifyTopicSubscribers($topicId, $forumObj) {
    10. $topicId = intval($topicId);
    11.  
    12. $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('topic_title', 'tx_mmforum_topics', 'uid = ' . $topicId . $forumObj->getStoragePIDQuery());
    13. list($topicName) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
    14.  
    15. $sender = $forumObj->conf['notifyingMail.']['sender'];
    16. if (!preg_match('/<([^><@]*?)@([^><@]*?)>$/',$forumObj->conf['notifyingMail.']['sender'])) {
    17. $sender = $forumObj->conf['notifyingMail.']['sender'] . ' <' . $forumObj->conf['notifyingMail.']['sender_address'] . '>';
    18. }
    19.  
    20. $Typo3_htmlmail = t3lib_div::makeInstance("t3lib_htmlmail");
    21. $Typo3_htmlmail->start();
    22.  
    23. $Typo3_htmlmail->from_email = $forumObj->conf['notifyingMail.']['sender_address'];
    24. $Typo3_htmlmail->from_name = $forumObj->conf['notifyingMail.']['sender'];
    25. $Typo3_htmlmail->returnPath = $forumObj->conf['notifyingMail.']['sender_address'];
    26. $Typo3_htmlmail->replyto_email = $Typo3_htmlmail->from_email;
    27. $Typo3_htmlmail->replyto_name = $Typo3_htmlmail->from_name;
    28. $Typo3_htmlmail->organisation = "";
    29. $Typo3_htmlmail->priority = 3;
    30.  
    31.  
    32. $template = $forumObj->pi_getLL('ntfMail.text');
    33.  
    34. $linkParams[$forumObj->prefixId] = array(
    35. 'action' => 'open_topic',
    36. 'id' => $topicId
    37. );
    38.  
    39. $link = $forumObj->pi_getPageLink($GLOBALS['TSFE']->id, '', $linkParams);
    40. $link = $forumObj->tools->escapeBrackets($link);
    41.  
    42. if (strlen($forumObj->conf['notifyingMail.']['topicLinkPrefix_override']) > 0) {
    43. $link = $forumObj->conf['notifyingMail.']['topicLinkPrefix_override'] . $link;
    44. } else {
    45. $link = $forumObj->tools->getAbsoluteUrl($link);
    46. }
    47. // convert link to HTML Link .. for plain message this tags will be deleted afterwards ...
    48. $link = "<br>\n<br>\n<a href=\"" . $link . "\">" . $_SERVER['SERVER_NAME'] . " -> " . $forumObj->pi_getLL('board.rootline') . "</a><br>\n<br>\n" ;
    49.  
    50.  
    51. //w.f.29.06.11 adding of message and username for the email
    52. $topicPosterUsername = $GLOBALS['TSFE']->fe_user->user['username'];
    53. $message = strip_tags($forumObj->piVars['message']);
    54.  
    55. $pattern = "|[[\/\!]*?[^\[\]]*?]|si";
    56. $replace = "";
    57. $message = preg_replace($pattern, $replace, $message);
    58.  
    59. $marker = array(
    60. '###TOPICPOSTERUSERNAME###' => $topicPosterUsername,
    61. '###POST###' => $message,
    62. '###LINK###' => $link,
    63. '###TOPICNAME###' => $topicName,
    64. '###BOARDNAME###' => $forumObj->conf['boardName']
    65. );
    66.  
    67. // get all users on this topic
    68. $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
    69. 'DISTINCT m.user_id, u.email, u.' . $forumObj->getUserNameField(),
    70. 'tx_mmforum_topicmail m, fe_users u',
    71. 'm.user_id = u.uid AND m.topic_id = ' . $topicId .
    72. ' AND u.deleted = 0 AND u.email != "" AND u.disable = 0 AND m.user_id != ' . intval($GLOBALS['TSFE']->fe_user->user['uid']) . $forumObj->getStoragePIDQuery('m')
    73. );
    74.  
    75. // get the html Email tempalte
    76. $this->templateCode = $forumObj->cObj->fileResource($this->conf["MailTemplateFile"]);
    77. if (!$this->templateCode ) {
    78. $this->templateCode = $forumObj->cObj->fileResource("fileadmin/templates_connect/extensiontemplates/mail/mail.html") ;
    79. }
    80. // get the singature
    81. $html_signature = tx_nemsignature::getSignature($GLOBALS['TSFE']->sys_language_uid);
    82. $plain_signature = tx_nemsignature::getSignature($GLOBALS['TSFE']->sys_language_uid, FALSE);
    83.  
    84. // echo "signature:" . $html_signature ;
    85.  
    86.  
    87. // loop through each user who subscribed
    88. while (list($toUserId, $toEmail, $toUsername) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)) {
    89. $marker['###USERNAME###'] = $forumObj->escape($toUsername);
    90. $mailtext = $forumObj->cObj->substituteMarkerArrayCached(nl2br($template), $marker);
    91.  
    92. // Compose mail and send
    93. if (!empty($toEmail)) {
    94. $llMarker = array(
    95. '###TOPICNAME###' => $forumObj->escape($topicName),
    96. '###BOARDNAME###' => $forumObj->escape($forumObj->conf['boardName'])
    97. );
    98. $subject = $forumObj->pi_getLL('ntfMail.subject');
    99.  
    100. // Include hooks
    101. if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['newPostMail_contentMarker'])) {
    102. foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['newPostMail_contentMarker'] as $_classRef) {
    103. $_procObj = &t3lib_div::getUserObj($_classRef);
    104. $llMarker = $_procObj->newPostMail_contentMarker($llMarker, $row, $forumObj);
    105. }
    106. }
    107. if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['newPostMail_subject'])) {
    108. foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['newPostMail_subject'] as $_classRef) {
    109. $_procObj = &t3lib_div::getUserObj($_classRef);
    110. $subject = $_procObj->newPostMail_subject($subject, $row, $forumObj);
    111. }
    112. }
    113. $subject = $forumObj->cObj->substituteMarkerArray($subject, $llMarker);
    114.  
    115. // generate $htmlMail and Plain Message from $mailtext
    116. $plain_message = strip_tags( str_replace (array("<br>", "<br />", "<br/>", "<BR>", "<BR/>","<BR />","<p>","<P>"),
    117. array("\n","\n","\n","\n","\n","\n","\n","\n") ,
    118. $mailtext ) ."\n\n" . $plain_signature) ;
    119.  
    120.  
    121. $emailMarkerArray['###HEADLINE###'] = $subject;
    122. $emailMarkerArray['###TEXT###'] = $mailtext;
    123. $emailMarkerArray['###IMPRESSUM###'] = $html_signature;
    124. $htmlMail = $forumObj->cObj->substituteMarkerArray($this->templateCode, $emailMarkerArray);
    125.  
    126.  
    127.  
    128. $Typo3_htmlmail->subject = $subject;
    129. $Typo3_htmlmail->setPlain($Typo3_htmlmail->encodeMsg($plain_message));
    130. $Typo3_htmlmail->setHtml($Typo3_htmlmail->encodeMsg($htmlMail));
    131. $Typo3_htmlmail->fetchHTMLMedia();
    132. $Typo3_htmlmail->substMediaNamesInHTML(0);
    133.  
    134. $Typo3_htmlmail->setHeaders();
    135. $Typo3_htmlmail->setContent();
    136. $Typo3_htmlmail->setRecipient($toEmail);
    137.  
    138. $Typo3_htmlmail->send($toEmail) ;
    139.  
    140.  
    141. }
    142. }
    143. }

  • Outlaw Outlaw
    Jedi-Meister
    0 x
    264 Beiträge
    0 Hilfreiche Beiträge
    27. 07. 2012, 15:20

    Wie hier und auch bei mir wird ja was verschickt, halt nur ohne Inhalt ....

    Von "gar nichts" kann also nicht die Rede sein.

    Gruß
    Outi

  • jvelletti jvelletti
    Padawan
    0 x
    53 Beiträge
    0 Hilfreiche Beiträge
    20. 02. 2013, 10:31

    UPDATE zu meiner Lösung oben :

    zum einen die meines Wissens Kopierte Funktion "substituteMarkerArrayCached "
    $mailtext = $forumObj->cObj->substituteMarkerArrayCached(nl2br($template), $marker);

    ersetzen durch :
    substituteMarkerArray
    also:
    $mailtext = $forumObj->cObj->substituteMarkerArrayCached(nl2br($template), $marker);

    oder besser gleich auch auf $Typo3_htmlmail verzichten und die neue Mail API nutzen..

    siehe angehängte Datei class.tx_mmforum_havealook.php (renamed to .txt)

    Anhänge (1)
    class.tx_mmforum_havealook.txt text/plain 0,00 B 371 heruntergeladen
  • 1