Announcement

Collapse
No announcement yet.

PC based local mail

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

    PC based local mail

    Actinic can send Emails out of the PC Client and the Shop server.

    I have read the discussions about the server SMTP issues, although I haven't resolved mine yet - I kept getting hard merge errors with Norman's SENDMAIL patch to Actinic.pm. But I have more things to try yet!!!!

    But I am a little puzzled by the inability (at least on my part) to send a Local Email out of Actinic on the PC - horror of horrors - does this attempt to use SMTP as well !!!! - if so what server name is it using.

    Please tell me I have got the wrong end of the stick.

    Steve

    #2
    First thing to find out is whether you host allows you to send SMTP

    Who is your host?

    Comment


      #3
      I kept getting hard merge errors with Norman's SENDMAIL patch to Actinic.pm
      Apart from patching errors, you should check with your server people as to whether they have the Perl Mail::Mailer module installed. If they don't then my patch will fail with a run-time error (like you're getting).

      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Actinic Mail from your PC gets posted to the server where the scripts try to mail it out using SMTP.

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

        First Tackle - Fly Fishing and Game Angling

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

        Comment


          #5
          Jo,

          I use COMPILA (advertised on Actinics site) who tell me to use localhost, but this gives me an authorisation error - they just tell me to get in touch with Actinic support - Yes but it looks like my servers issue to me.

          Norman,

          Lots of people use your SENDMAIL patch - I even understand how it works - COMPILA do have mail::mailer available, or so it says in their list. I think there might be a problem in the Actinic upload FTP routines that do this "merge", I am planning to experiment with DIFF files --- see other thread from mid last year. I get the same failure if I put a simple assignment statement (alone) into Actinic.pm - and that ain't right !

          Olderscot,

          You have restored my sanity - that explains why "local" Email exhibits the self same problems as server Email.


          I think I MUST get Norman's SENDMAIL patch loaded cleanly - you all have (anyone done it in 6.1.4 yet?) so it must be possible even for me.

          Thanks everyone for your help, it really is much appreciated.

          Steve

          Comment


            #6
            To resolve whether your Merge errors are anything to do with my SMTP patch, just replace Actinic.pm with the original version. If the merge now works it's that patched script that's wrong.

            Norman
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Norman,

              My ISP does not support Mail::Mailer ---- thus explaining my grief ---- along with not supporting SMTP as well, I could be despairing.

              Who knows what they will really do, if only I could get one of them to actually try and support a user --- oh well been there before !

              With your encouragement, I took your Mail::Mailer patch, and with minor modification made it a raw SENDMAIL patch (that does not now need Mail::Mailer). It works for me, at last I have seen an Email. Hurrah.

              Would you like to look over this scrap of script and see if you think I may have missed something - note - it is your patch, without the "use" statement, and the interface adjusted accordingly.

              Steve



              #######################################################
              #
              # SendRichMail - Send an email to the specified email
              # address if this service has been requested.
              #
              # Params: 0 - the smtp server ip address
              # 1 - the destination email address
              # 2 - the subject
              # 3 - the message as text
              # 4 - the message as HTML
              # 5 - optional return address
              #
              # Returns: 0 - status
              # 1 - message
              #
              #######################################################

              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;
              # then use the destination email address
              }

              my $semail = "/usr/sbin/sendmail -t";

              open(XMAIL, "|$semail") or die "Cannot open $semail: $!";
              print XMAIL "Reply-to: ", $sReturnAddress, "\n";
              print XMAIL "Subject: ", $sSubjectText, "\n";
              print XMAIL "To: ", $sEmailAddress, "\n";
              print XMAIL "Content-type: text/plain\n\n";
              print XMAIL $sMessageText;
              close(XMAIL);

              return($::SUCCESS, '', 0, 0);
              }

              Comment


                #8
                I think a "From: " would help as well - but I will have to check that later on.


                print XMAIL "Subject: ", $sSubjectText, "\n";
                print XMAIL "To: ", $sEmailAddress, "\n";


                Steve

                Comment


                  #9
                  Yep you could stick:-

                  print XMAIL "From: ", $sReturnAddress, "\n";

                  presumably below the To: line.

                  Norman
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    You could also try this:-

                    replace

                    my $semail = "/usr/sbin/sendmail -t";


                    with


                    my $semail = $sSmtpServer;

                    and now this patch becomes machine unspecific as you can go into Advanced / Network Setup and put

                    /usr/sbin/sendmail -t

                    (or whatever your server uses) into SMTP Server.

                    Norman

                    p.s. The reason I went the Mail::Mailer route is that it removes the need to know system specific things like the name and path of you mail sending program.
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment


                      #11
                      Just to convey my thanks and gratitude for this fix!!

                      My install was working fine until someone here altered some routing on the network (we host our own sites), and the cart no longer sent emails. No matter what I did with the settings on the web server machine, Actinic didn't seem to want to send mails, despite me changing the nameserver address (which seemed to fix things so I could send mail via the bash prompt).

                      But this alteration to the Actinic.pm file has fixed all, thank you to Norman and s-j-r

                      Comment

                      Working...
                      X