Skip to main content

Hello,

I have been using a maximizer web form on my site hosted by 1and1.com for years without a problem. I am in the process of switching hosting companies to hostgator.com and I cannot get the exact same form to work properly.

The form appears to execute it just doesn't send the .mti attachment out. The form does move to the "completion" page without an issue.

The host has confirmed all the PERL modules are loaded. The SMTP settings would appear to be the issue as the email is never sent. The Host company asked if there was any way to use sendmail rather than a SMTP.

Has anyone else out there had this problem when switching web hosts and if so how did you resolve it? Also, as anyone adapted the winqcgi.pl script to use sendmail rather than the SMTP.

Thanks,

Jason
Original Post
>anyone adapted the winqcgi.pl script to use sendmail rather than the
>SMTP

I don't have a way of testing it right now, but the following should work as a replacement for the existing foreach loop.

   foreach my $EmailRecipient ( @Emails )
   {
      # escape characters that would confuse the backtick command
      $EmailRecipient =~ s/'/\\'/g;
      $EmailRecipient =~ s/&/\\&/g;
      $from_email =~ s/'/\\'/g;
      $from_email =~ s/&/\\&/g;
   
      $ErrMsg =`/usr/lib/sendmail -f "$from_email" -N "FAILURE" $EmailRecipient << \\END_INPUT
From: $from_email
To: $EmailRecipient
Subject: Web Inquiry
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="--=_NextPart_000_0018_01C0EA94.CF948390"


This is a multi-part message in MIME format.

----=_NextPart_000_0018_01C0EA94.CF948390
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Open the attachment to import it into Maximizer.

----=_NextPart_000_0018_01C0EA94.CF948390
Content-Type: application/octet-stream; name="$attachfilename"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=$attachfilename

$mtifile

----=_NextPart_000_0018_01C0EA94.CF948390--
`;
      if ($ErrMsg) {
         die "sendmail error: $ErrMsg";
      }
   }


You may need to adjust the path to sendmail. Also, make sure that CGI scripts are permitted to use the backtick operator.

Add Reply

Post
LEGAL INFO
CONTACT US
Copyright 2007-2018 Advoco Solutions Ltd. All Rights Reserved.
×
×
×
×
Link copied to your clipboard.
×