Topic: Is it possible to simply setup eform to look to class.phpmailer.php?  (Read 999 times)

Pages: [1]   Go Down

#1: 25-May-2009, 05:48 PM

tspore
Posts: 55

I need to setup eform to use SMTP, but to do that seems a bit complex, wouldn't it be easier for eform.inc.php to simply read the phpmailer for settings? If so how could we do that simply?

#2: 26-May-2009, 12:58 AM

Coding Team

sottwell
Posts: 10,439

WWW
Actually making eForm do SMTP is quite easy. There are three places in the eform.inc.php file where the phpmailer class is configured. Just replace the $mail->IsMail(); lines with $mail->isSMTP(); and add a line:
Code:
$mail->isSMTP();
$mail->Host = 'smtp.maildomain.com';
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#3: 8-Jun-2009, 07:06 PM

tspore
Posts: 55

I cannot get eform to work -
I replaced the values with -
$mail->isSMTP();
$mail->Host = 'mail.mydomain.net';
$mail->User = 'form@mydomain.net';
$mail->Password = 'mypassword;

But it won't send.

I replaced in the 4 places the line -  $mail->IsMail();
if ($mobile && $mobiletext) {
               $mobiletext = formMerge($mobiletext,$fields);
               $mail = new PHPMailer();
               $mail->IsMail();
               $mail->CharSet = $modx->config['modx_charset'];
               $mail->IsHTML($isHtml);
               $mail->From      = $from;
               $mail->FromName   = $fromname;
               $mail->Subject   = $subject;
               $mail->Body      = $mobiletext;
               AddAddressToMailer($mail,"to",$mobile);
               $mail->send();

What am I doing wrong?

#4: 8-Jun-2009, 10:52 PM

Coding Team

sottwell
Posts: 10,439

WWW
Are you sure you need the username/password? So far in every site I've made this change for, all that was needed was the server name. Since the mail was coming from the same server, it didn't want the username/password.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#5: 8-Jun-2009, 11:01 PM

tspore
Posts: 55

Yea I tried it. I only allow authentication to my mail server. I did try it but no luck.
So anyone have any other thoughts?

#6: 8-Jun-2009, 11:08 PM

Coding Team

sottwell
Posts: 10,439

WWW
no, sorry, I've never had it not work like that. Your mail logs should have something, though, as long as you're sure you've got the mail server's name correct and it's actually trying to connect.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#7: 9-Jun-2009, 01:11 AM

tspore
Posts: 55

Just keep getting no authentication -
 8 20:45:00[0] Rejected 127.0.0.1 FROM:<root@mydomain.com> <undefined> 0 g_smpt_noauth "ÿÿÿÿ"

So I have built a server that can't send mail without authentication, but now I can't send mail from eform. Any good ideas... Anyone?
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.