This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
[closed] Send email via external email server?
Started 16 years ago by MyAirplane | 9 posts |
-
We do not run sendmail on our box but instead require all web apps to login to our SMTP server. How can I set this up in MachForm?
Also, I woudl like to put an extension field next to the phone number field, but don't see this option?
Posted 16 years ago # -
Hello,
To use an external email server, you will need to modify your includes/helper-functions.php file.
Around line 437, you'll find this code:
$mail->Host = "127.0.0.1";
Simply change the value to your external mail server. If your server requires authentication, additional lines need to be added, something like below:$mail->Host = "127.0.0.1"; $mail->Username = "your_username"; $mail->Password = "your_password"; $mail->SMTPAuth = true;
Regarding the extension field for the phone number, I'm afraid we don't have that option yet, sorry.MachForm Founder
Posted 16 years ago # -
I see the line you refer to and have added these fields. Do I need to change the value of the following line:
$mail->Mailer = "mail";
Posted 16 years ago # -
Try leaving it that way. If it doesn't work for you, change it to this:
$mail->Mailer = "smtp";
MachForm Founder
Posted 16 years ago # -
i left it as is and the form worked but I didn't get any emails.
I changed it to smtp, and now the form doesn't show a confirmation. the page says 'done' loading with only this URL
.../view.php
Posted 16 years ago # -
one more thing. i had this problem with another web app. i had to refer to phpmailer instead of mail. not sure what the syntax would be for your app, though...
Posted 16 years ago # -
Hmm..I think I'll need to check your server directly for this.
I've just sent you an email, let's continue there.MachForm Founder
Posted 16 years ago # -
I made the changes and now get this when i try to do a test message..
Warning: PHPMailer::include_once(class.smtp.php) [function.PHPMailer-include-once]: failed to open stream: No such file or directory in /home/eflybook/www/machform/lib/class.phpmailer.php on line 460
Warning: PHPMailer::include_once() [function.include]: Failed opening 'class.smtp.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/eflybook/www/machform/lib/class.phpmailer.php on line 460
Fatal error: Class 'SMTP' not found in /home/eflybook/www/machform/lib/class.phpmailer.php on line 527
Posted 16 years ago # -
Nevermind.. download the PHPMailer classes from sourceforge. Works fine now..
Posted 16 years ago #
Topic Closed
This topic has been closed to new replies.