Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic Problem sending e-mails YaBB 2.6.12 (Read 608 times)
 
Paste Member Name in Quick Reply Box pyragony54
Language
***
Offline


I Love YaBB!

Posts: 767
Location: Йошкар-Ола
Joined: May 25th, 2014
Gender: Male
Mood: Dead
Zodiac sign: Scorpio
Re: Problem sending e-mails YaBB 2.6.12
Reply #6 - Mar 5th, 2021 at 6:57pm
Mark & QuoteQuote  
Unfortunately no effect, HTML is still displayed, but the mails are being delivered.

I'll set up a test forum for you tomorrow, then you'll do it easier. But think about it, it's almost only German servers that refuse port 25. Gmail, Yahoo, and a few others accept port 25.
  

if (idea == 'none') {use (manuals) && (Google | | search)}
if ($ answer == 0) {post (question)}
Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2175
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Problem sending e-mails YaBB 2.6.12
Reply #5 - Mar 5th, 2021 at 5:47pm
Mark & QuoteQuote  
Okay, IN THEORY:
Find:
Code (Perl)
Select All
sub tomail {
     my ( $MAIL, $mailout ) = @_;
     my ( $fromheader, $toheader, $subject, $message, $charsetheader ) =
       @{$mailout};
     print {$MAIL} "To: $toheader\n"           or croak "$croak{'print'} mail";
     print {$MAIL} "From: $fromheader\n"       or croak "$croak{'print'} mail";
     print {$MAIL} "X-Mailer: YaBB Sendmail\n" or croak "$croak{'print'} mail";
     print {$MAIL} "Subject: $subject\n"       or croak "$croak{'print'} mail";
     print {$MAIL} "MIME-Version: 1.0\n\n$cte\nContent-Type: text/html\; charset=$charsetheader\n\n"
       or croak "$croak{'print'} mail";
     $message =~ s/\r\n/\n/gsm;
     print {$MAIL} "<pre $pre>$message</pre>\n" or croak "$croak{'print'} mail";
     return;
 } 


  and replace it with:
Code (Perl)
Select All
sub tomail {
     my ( $MAIL, $mailout ) = @_;
     my ( $fromheader, $toheader, $subject, $message, $charsetheader ) =
       @{$mailout};
     $message =~ s/[\r\n]/\n/gxsm;
     $mailout =
 "To: $toheader\nFrom: $fromheader\nX-Mailer: YaBB Sendmail\nSubject: $subject\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 8bit\r\nContent-Type: text/html\; charset=UTF-8\r\n<pre $pre>$message</pre>\n";
     print {$MAIL} $mailout or croak "$croak{'print'} mail";
     return;
 } 



Since you're not using UTF-8, you'll need to replace  charset=UTF-8 with charset=ISO-8859-1
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box pyragony54
Language
***
Offline


I Love YaBB!

Posts: 767
Location: Йошкар-Ола
Joined: May 25th, 2014
Gender: Male
Mood: Dead
Zodiac sign: Scorpio
Re: Problem sending e-mails YaBB 2.6.12
Reply #4 - Mar 5th, 2021 at 4:44pm
Mark & QuoteQuote  
Yes. NET::SMTP delivers the mail. The only problem is the html code.

Quote:
Port - port to connect to. Default - 25 for plain SMTP and 465 for immediate SSL


  

if (idea == 'none') {use (manuals) && (Google | | search)}
if ($ answer == 0) {post (question)}
Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2175
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Problem sending e-mails YaBB 2.6.12
Reply #3 - Mar 5th, 2021 at 4:24pm
Mark & QuoteQuote  
pyragony54 wrote on Mar 5th, 2021 at 3:34pm:
With NET :: SMTP the mails are delivered, even without the above change, it doesn't work at all.


You say NET :: SMTP does deliver mail?
Code (Perl)
Select All
             my $port = 25; 


The number needs to be whatever your correct port is. (587)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box pyragony54
Language
***
Offline


I Love YaBB!

Posts: 767
Location: Йошкар-Ола
Joined: May 25th, 2014
Gender: Male
Mood: Dead
Zodiac sign: Scorpio
Re: Problem sending e-mails YaBB 2.6.12
Reply #2 - Mar 5th, 2021 at 3:34pm
Mark & QuoteQuote  
Hi Dandello,

Unfortunately, that's not the reason. It's purely about removing the html code. With NET :: SMTP the mails are delivered, even without the above change, it doesn't work at all.

Code (Perl)
Select All
Content-Type: text/html; charset=ISO-8859-1

 <pre style="padding:5px 40px; box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; display:block; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; width:100%; overflow-x:auto;">Willkommen, roadi3000.
 Dies ist der Aktivierungslink für Deinen Account.


 Du wurdest im Anti-Scam-Forum erfolgreich vorregistriert.
 Um die Registrierung endgültig abschließen zu können ist es erforderlich, dass Du Deinen Account innerhalb von 24 Stunden aktivierst.

 Klicke zur Account Aktivierung bitte auf den folgenden Link.

 <a href="https://www.anti-scam.de/cgi-bin/yabb2/YaBB.pl?action=activate&username=5B46484D401A191919290&activationkey=QC48quKln0FO6dN8EQe1">https://www.anti-scam.de/cgi-bin/yabb2/YaBB.pl?action=activate&username=5B46484D401A191919290&activationkey=QC48quKln0FO6dN8EQe1</a>

 Falls der Link nicht funktioniert (oder falls Du AOL verwendest), kopiere den Link, und füge ihn in die Adressleiste Deines Web-Browsers ein.

 Mit freundlichem Gruß,
 Das Anti-Scam-Forum Team</pre> 



When sending with "UNIX / LINUX sendmail" or YaBB-SMTP-Engine "the html code is not shown, but I cannot send mail to any German mail provider. Port 25 is simply blocked by the German Telekom and all German mail providers have to use the Telekom, they have the line monopoly.

  

if (idea == 'none') {use (manuals) && (Google | | search)}
if ($ answer == 0) {post (question)}
Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2175
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Problem sending e-mails YaBB 2.6.12
Reply #1 - Mar 5th, 2021 at 1:33pm
Mark & QuoteQuote  
In theory - since I can't test it. In the 6.12 Mailer.pm find [code perl]
           eval q^
                use Net::SMTP;
                push @arg, Debug => 0;
                $smtp = Net::SMTP->new(@arg) || croak "Unable to create Net::SMTP object. Server: '$smtp_server'\n\n" . $OS_ERROR;
            ^;[/code]

and make it [code perl]
           eval q^
                use Net::SMTP;
               my $port = 25;
                if ($smtp_server =~ s/:(\d+)$//sm) { $port = $1; }
                push @arg, Port => $port;
                push @arg, Debug => 0;
                $smtp = Net::SMTP->new(@arg) || croak "Unable to create Net::SMTP object. Server: '$smtp_server'\n\n" . $OS_ERROR;
            ^;[/code]

Change the $port to your new port number.

This MAY solve the port issue. As for the html showing in emails - haven't got that completely sorted yet since my home test server doesn't send emails.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box pyragony54
Language
***
Offline


I Love YaBB!

Posts: 767
Location: Йошкар-Ола
Joined: May 25th, 2014
Gender: Male
Mood: Dead
Zodiac sign: Scorpio
Problem sending e-mails YaBB 2.6.12
Jul 24th, 2020 at 7:18pm
Mark & QuoteQuote  
In Germany, more and more free e-mail servers block port 25.
I therefore wanted to set Net :: SMTP (Perl module) in the mail settings, which also worked.
However, all messages look like this:

Code
Select All
<pre style="padding:5px 40px; box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; display:block; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; width:100%; overflow-x:auto;">Willkommen, Idioteken.
 Dies ist der Aktivierungslink für Deinen Account.


 Du wurdest im Anti-Scam-Forum erfolgreich vorregistriert.
 Um die Registrierung endgültig abschließen zu können ist es erforderlich, dass Du Deinen Account innerhalb von 12 Stunden aktivierst.

 Klicke zur Account Aktivierung bitte auf den folgenden Link.

 <a href="https://www.anti-scam.de/cgi-bin/yabb2/YaBB.pl?action=activate&username=0429242239282628234D0&activationkey=58BIt58gWHQqFHhntQxw">https://www.anti-scam.de/cgi-bin/yabb2/YaBB.pl?action=activate&username=0429242239282628234D0&activationkey=58BIt58gWHQqFHhntQxw</a>

 Falls der Link nicht funktioniert (oder falls Du AOL verwendest), kopiere den Link, und füge ihn in die Adressleiste Deines Web-Browsers ein.

 Mit freundlichem Gruß,
 Das Anti-Scam-Forum Team</pre> 



Also the test mail

Code
Select All
Content-Type: text/html; charset=ISO-8859-1

 <pre style="padding:5px 40px; box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; display:block; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; width:100%; overflow-x:auto;">Hallo Anti-Scam-Forum Webmaster!

 Dies ist ein Test der eMail-Einstellungen Deines Anti-Scam-Forum-Forums..

 Danke, dass Du YaBB benutzt!</pre>
  



Where is the mistake?

Where can I change the code so that mails are no longer sent via port 25 but via port 587?

What's next with YaBB 2.7? I have actually finished the translations and have already tested them several times. It has been standing still for over a year now.

I also found a lot of bugs, especially in the email settings. Here, shipping only works via Unix / Linuc / BSD
  

if (idea == 'none') {use (manuals) && (Google | | search)}
if ($ answer == 0) {post (question)}
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Problem sending e-mails YaBB 2.6.12

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry