Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fasthost - jmail.pl

Featured Replies

Hi has anyone got jmail.pl to work on fasthost? I'm currnently getting a Server Error.

 

Many thanks

 

David.

  • Author

Any joy anyone?

Hi mate, not sure what jmail.pl is.

 

Is it a PHP email form your having problem with?

  • Author

Hi here is the script:

 

i normally use Formmail.pl as I use oneandone for hosting I don't have a problem with that but it wont work on fasthost.

 

use OLE;

use CGI;

$jmail = CreateObject OLE "JMail.SMTPMail";

print "Content-type: text/html\n\n";

$form = new CGI;

 

$domain = $ENV {'SERVER_NAME'};

$referer = $ENV {'HTTP_REFERER'};

$url = $referer;

$url =~ s/^http:\/\///i;

$url =~ s/^www\.//i;

$domain =~ s/^www\.//i;

 

$Sender = $form->param('email');

 

$SMTPServer = "smtp.$domain:25";

#$Recipient = "form\@$SMTPServer";

$Recipient = $form->param('recipient');

$Subject = $form->param('subject');

$Priority=1;

$Header = "Originating-IP", $ENV{'REMOTE_ADDR'};

 

$jmail->{ServerAddress} = $SMTPServer;

$jmail->{Sender} = $Sender;

$jmail->{Subject} = $Subject;

$jmail->AddRecipient ($Recipient);

 

 

$mail_body = '';

 

foreach $field ($form->param) {

foreach $value ($form->param($field)) {

$mail_body .= "$field: $value\n";

}

}

 

$jmail->{Body} = $mail_body;

$jmail->{Priority} = $Priority;

$jmail->AddHeader ($Header);

 

if ($url =~ m/^$domain/)

{

$mailmessage = "Mail was sent.";

$jmail->Execute;

}

else

{

$mailmessage = "mail not sent. Incorrect Referer";

}

 

print "Content-type: text\n\n";

print "Result: $mailmessage\n\n";

#print "Recipient: $Recipient\n\t\n";

#print "Sender: $Sender SMTP Server: $SMTPServer\t";

#print "Subject: $Subject Referer: $referer";

#print "Domain: $domain url: $url ";

 

 

print <<"(END ERROR HTML)";

 

Content-type: text/html

 

<html>

<head>

<title>Enquiry</title>

<META HTTP-EQUIV="Refresh" CONTENT="0; URL=../thanks.html">

</head>

<body>

 

</body>

</html>

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.