Announcement

Collapse
No announcement yet.

SMTP problems suddenly appeared

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #91
    That sounds rather like this problem. http://community.sellerdeck.com/arch...p/t-47995.html

    Is this a general problem or just with one order?
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #92
      1and1 email delay

      Sending e-mail via sendmail (or whatever the host supports) instead of SMTP

      This needs a host with Perl that supports the Mail::Mailer module (OneAndOne does).



      Just added this patch and it worked brilliantly.
      Order confirmation email was sent within 3 seconds as opposed to the 40 to 60 seconds it had been since 1and1 changed their system.
      Thank you.

      Comment


        #93
        I too am having probs with 1and1

        If I cant get it sorted today im leaving them.
        Kind regards,

        Michael

        www.stageprint.co.uk

        Comment


          #94
          The "sendrichmail" script amendment in actinic.pm helped us in Actinic v10

          but we are upgrading to v12 (2013) and using script causes a "500 internal server error" during checkout...

          Is there an updated version of the script change for v12?

          Comment


            #95
            AFAIK there isn't an uodated version for V12 but you could check Norman's site at drillpine.biz.

            V12 introduced HTML emails which is bound to have some impact on the email sending routines.

            Have you enabled HTML emails? I just wonder if sticking to plain text emails avoids the problem?

            Mike
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment


              #96
              Thank you Mike, I have checked out the site but nothing on this.

              I will give HTML Emails a go tonight
              but I don't think the format type changes the way the server handles the sending of emails

              Comment


                #97
                Hi,

                After a weekend of testing, upgrading to v12 and figuring out a little bit of Crystal Reports (and finding extremely weird things happening in "Program Files (x86)" on Windows 8)

                I found that the code does work for v12

                Comment


                  #98
                  Good to hear.

                  using script causes a "500 internal server error" during checkout..
                  So what was causing the problem at checkout?
                  -----------------------------------------

                  First Tackle - Fly Fishing and Game Angling

                  -----------------------------------------

                  Comment


                    #99
                    my bad, I forgot to add "use Mail::Mailer;" so it failed the emailing part... lol

                    Comment


                      Originally posted by NormanRouxel View Post
                      Here's some code I wrote in the Actinic V6 days that replaces the Actinic SMTP code in Actinic.pm with a call to sendmail. Tested just now using V11 on 1&1 shared business / linux.

                      Note that this doesn't patch the Network Test module so the network test would fail but the code used in the Network Test is standalone and not used on the live site.

                      ************************
                      Sending e-mail via sendmail (or whatever the host supports) instead of SMTP

                      This needs a host with Perl that supports the Mail::Mailer module (OneAndOne does).

                      Patching instructions for Actinic.pm (back it up first - use a text editor - not a word processor):-

                      Look about 25 lines down from the top. You should see a line
                      Code:
                      use strict;
                      ADD the following line immediately after this
                      Code:
                      use Mail::Mailer;
                      Search for the line (there is only one instance)
                      Code:
                      sub SendRichMail
                      If using V6 onwards - DELETE the above line and everything following it down to the line above the following fragment
                      Code:
                      #######################################################
                      #
                      # GetScriptUrl - retrieve an url to the specified script
                      REPLACE the stuff you just deleted with the following new routine:-
                      Code:
                      sub SendRichMail
                      	{
                      #? ACTINIC::ASSERT($#_ >= 4, "Invalid argument count in SendRichMail ($#_)", __LINE__, __FILE__);
                      
                      	#
                      	# !!!!!! This is a function commonly used by many utilities.  Any changes to its interface will
                      	# !!!!!! need to be verified with the various utility scripts.
                      	#
                      
                      	if ($#_ < 4)
                      		{
                      		return($::FAILURE, GetPhrase(-1, 12, 'Actinic::SendRichMail'), 0, 0);
                      		}
                      
                      	my ($sSmtpServer, $sEmailAddress, $sLocalError, $sSubjectText, $sMessageText, $sMessageHTML, $sBoundary, $sReturnAddress);
                      	($sSmtpServer, $sEmailAddress, $sSubjectText, $sMessageText, $sMessageHTML, $sReturnAddress) = @_;
                      	#
                      	# Check message content for bare LFs and repair if there are some
                      	#
                      
                      	$sMessageText =~ s/\r\n/\n/g;        		# CRLF -> LF
                      	$sMessageText =~ s/\r/\n/g;          		# remaining CR -> LF
                      	$sMessageText =~ s/\n/\r\n/g;        		# all LF -> CRLF
                      							# and check the HTML content as well
                      	$sMessageHTML =~ s/\r\n/\n/g;        		# CRLF -> LF
                      	$sMessageHTML =~ s/\r/\n/g;          		# remaining CR -> LF
                      	$sMessageHTML =~ s/\n/\r\n/g;        		# all LF -> CRLF
                      	#
                      	# Check the return address
                      	#
                      	if (!$sReturnAddress)						# if no return address defined
                      		{
                      		$sReturnAddress = $sEmailAddress;			# use the destination email address
                      		}
                      
                      	# (V11) use systems sendmail program
                      	my $mailer = Mail::Mailer->new();
                      	if ( ! $mailer->open({ From    => $sReturnAddress,
                       	                To      => $sEmailAddress,
                                              Subject => $sSubjectText,
                                            })
                      	  )
                      		{
                      		return($::FAILURE, "SendMail failure! $!", 0, 0);
                      		}
                      
                              print $mailer $sMessageText;
                              $mailer->close();
                      
                      	return($::SUCCESS, '', 0, 0);
                      	}
                      Save and do a site update and that's that.

                      Bugs / Quirks.

                      Some users have reported that the e-mail is sent on one long line.
                      If this happens open the (patched)Actinic.pm and look for the line
                      Code:
                      	$sMessageText =~ s/\n/\r\n/g;        		# all LF -> CRLF
                      and comment it out by adding "#" at the beginning. I.e.
                      Code:
                      	#	$sMessageText =~ s/\n/\r\n/g;        		# all LF -> CRLF
                      Save and see if that fixes it.

                      Remember that if you update Actinic the updater will overwrite patched scripts with new
                      version and you'll have to redo the patch.
                      Thanks to Norman. After upgrading to 11.0.6 due to Sage Pay the Actinic.pm was replaced and emails stopped working. I tried the other fixes "mrvnet.kundenserver.de, auth.smtp.1and1.co.uk, localhost" but we had some people saying that wasn't working. This turned out to be the form taking about 10secs to submit, if they waited long enough there wasn't a problem.

                      So yesterday I got to trying Normans suggested code change in Actinic.pm and the form submits straight away with no delay.

                      I found the original Actinic.pm and had a look through - seems this was the same fix the original coders of our site had applied - assume they ran into the same issue.

                      John
                      John
                      Sheltons of Peterborough Ltd
                      www.sheltonsfishing.co.uk

                      Comment


                        Actinic.pm doesn't seem to be in the V14.03 installation. Has anyone used Norman's patch in this version?

                        Kind Regards
                        Karen
                        Kind Regards
                        Karen

                        Charmed Cards & Crafts

                        Comment


                          Yes it is - it's capitalised (and always has been) as ACTINIC.pm.
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            Oh is it? I even did a search for it. I'll have another look, thanks Norman.
                            Kind Regards
                            Karen

                            Charmed Cards & Crafts

                            Comment


                              Did anyone experience any problems with V14.03 using Norman's sendmail? Mail is sending so much faster now but I am having huge problems with email formatting that I don't know if it stems from this. Can't get any help on that.
                              Kind Regards
                              Karen

                              Charmed Cards & Crafts

                              Comment


                                It was the sendmail code that mucked up the email code. Have you got any code that works with Sellerdeck 14.03 please Norman? Will gladly pay for it.
                                Kind Regards
                                Karen

                                Charmed Cards & Crafts

                                Comment

                                Working...
                                X