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); } ?>