Sending secure mailforms

I’ve tried to use some of the Mail Form addons.
No one meets the requirements made to securely send mail forms from a home page, so for the moment I can’t use form on my - or any of my customers home pages!
Now I’ve got some advise from my hosting company, sending me some php code to implement, but I’m stuck in where and how I get it to work with some of the addons that already exist.
Are there some out there that can try to explain / help me if it’s to be integrated into some of the existing addons / plugins

Even the built in RW contact form page type with SMTP?

1 Like

Hi there Michael

I’ve even tried that as well, but my problem lies in where to implement the PHP code I’ve got from my danish hosting company. Here’s what they write about using this code
“In order for a mail to be sent, it is necessary to enter the correct sender email. That is, the sender must always be the user you log on to the mail server with.
This is a necessary protection against sending spam and the like through the mail system.”

It’s a “require once” code and if I make the page a PHP page, I’ve tried make it a iFrame but nothing work - i don’t even see the form, that’s implemented in the provided PHP code, on my page.
The only thing I think of now - can I implement as a prefix i the head on the HTML page where I want the form?

Thank you for your interest

John

1 Like

Oh right…

Maybe have these defined in your RW page:

Or you could try using a Gmail send to?

I’m not quite sure what their problem is, sorry…
Quite often you can’t send email using the same address as it’s liable for spoofing.

But yes, prefix would work for the PHP code.

Or use a third party mail form and embed it?

I was thinking you should ask @barchard
And he mentioned something similar:

:wink:

what do you mean by securely send? Formloom 3 is an excellent product with an SMTP option which can be secured with SSL. It also offer a Captcha and other customisable front end security checks

By “securely send” i mean that my hosting company has provided me with PHP code to implement if I want to use mail form through their serves - and that’s the problem.
I’ve tried to implement he provided PHP code, but with some addons I don’t even see the form in preview that’s in the code and i others it doesn’t send (or that’s what I think, because the receiver doesn’t get the data from the form)
I even tried with the pre-installed RW Plugin.

What I haven’t tried is to Prefix it to a html page and call it from a integrated form addon.

John

I don’t understand why your hosting company need to do this. The plug in gives all you need and adding additional php code will confuse things unless you have a specific task in mind and know what you are doing. Maybe try a different host - i;'ve never heard of this type of issue before.

1 Like

If you could provide a bit more information, it might help people to give you a hand.

Who is your hosting company? Someone in the RapidWeaver community may have experience with this host. If not they may have some knowledge base, we could use to help figure this out.

Also what mail form are you using?
Could you provide screenshots of your setup of the mail form?

Are you using the same email address (sender) as your sign-on?

As for the PHP code, your host sent you we would need to look at it to determine what it is they are sending you.

Required once is an include library within PHP, so that doesn’t help much without seeing the entire code they are sending you. Many of the mail forms available for RW do use the PHP mail function.

1 Like

Sorry for the delay - I’ve tried ask hosting comp, but they haven’t come up with more info (they think it’s not their prob!)
Here’s the php code - hope it shows where I’m stuck. Wherever I try to put it, there’s a fatal error

<?php require_once "Mail.php"; $to = "support@talkactive.net"; $subject = "test mail"; $body = "This is a message".var_export($_SERVER, true); $username = 'mailaccount@yourdomain.net'; $password = 'mail-password'; $headers = array ('From' => $username, 'To' => $to, 'Subject' => $subject, 'Date' => date('r', time())); $smtp = Mail::factory('smtp', array ( 'host' => 'mail.web10.net', 'port'=>'587', 'auth' => true, 'username' => $username, 'password' => $password, 'SMTPSecure' => 'tls', 'localhost' => 'mail.web10.net')); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("
" . $mail->getMessage() . "
".PHP_EOL); } else { echo("Message successfully sent!".PHP_EOL); } ?>