Announcement

Collapse
No announcement yet.

Change Contact Us to Newsletter Subscription Form

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

    #16
    Any joy with this yet from anyone at Actinic?

    Thanks

    Pete

    Comment


      #17
      I think you may have left out the following stages of the fix:

      Code:
      12.	Then search for: '# Construct the mail text and send it to the merchant'
      
      13.	You need to add a line for each field after:
      
      $sTextMailBody .= ACTINIC::GetPhrase(-1, 2373) . "\r\n" . $sMessage . "\r\n\r\n";
      
      for example:
      
      $sTextMailBody .= "MyNewFieldName:" . $sMyNewField . "\r\n";
      In your case it would be

      $sTextMailBody .= "Subscription:" . $sSubscribe . "\r\n";

      Comment


        #18
        Chris, thanks for this. Do I just need to add the one line for Subscribe or a second one for Unsubscribe as well?

        Comment


          #19
          The one line will cover both situations as '$sSubscribe' is a variable, which will be substituted for whatever the customer selects online.

          Comment


            #20
            Will try and report back - thanks Chris

            *EDIT* WORKS A TREAT - thanks again

            Comment


              #21
              Hi,

              Further to the previous messages I have been trying to ensure that when a customer subscribes or unsubscribes to the newsletter, the resulting email states their preference.

              I have tried to implement the changes in the MailForm.pl file but each time I edit the script to add the information Chris has suggested, I get the following error on the Newsletter Subscription page:

              Internal Server Error
              The server encountered an internal error or misconfiguration and was unable to complete your request
              I know this is due to an error within the changes I have made within the MailForm.pl file as when I revert it back to the way it was originally the page displays fine. However, I still then have the problem that the emails received don't state whether the customer is subscribing or unsubscribing.

              I can't see what I have done wrong, but I have obviously done something incorrectly. I have included the information I have added to the MailForm.pl below (highlighted in bold):

              # Construct the mail text and send it to the merchant
              #
              $sError = ACTINIC::GetPhrase(-1, 2377);
              $sTextMailBody .= ACTINIC::GetPhrase(-1, 2370) . $sName . "\r\n";
              $sTextMailBody .= ACTINIC::GetPhrase(-1, 2371) . $sEmailRecpt . "\r\n";
              $sTextMailBody .= ACTINIC::GetPhrase(-1, 2373) . "\r\n" . $sMessage . "\r\n\r\n";
              $sTextMailBody .= "Subscription:" . $sSubscribe . "\r\n";
              my @Response = ACTINIC::SendMail($::g_sSmtpServer, $$::g_pSetupBlob{EMAIL}, $sSubject, $sTextMailBody, $sEmailRecpt);
              if ($Response[0] != $::SUCCESS)
              I have probably misunderstood the instructions and would be grateful if somebody could point me in the right direction.

              I have also noticed that the resulting email sent does not include the 'surname' of the customer, only the first name. How do I ensure that all fields are in fact sent on the email?

              Thanks,
              Jules

              Comment

              Working...
              X