MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Jul 05, 2009, 09:10 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search via SMF
or Google:
modx forums
all of modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Read what MODx Developers say:
MODx Dev. Blogs
MODx Community Forums
»
Add-ons, Extensions & Elements
»
Forms, Form Processing & Anti-Spam
»
eForm
(Moderator:
TobyL
)
»
eform SMTP
Pages: [
1
]
Go Down
« Previous topic
Next topic »
Print
Author
Topic: eform SMTP (Read 842 times)
0 Members and 1 Guest are viewing this topic.
marcello
Jr. Member
Posts: 5
eform SMTP
«
on:
Dec 02, 2008, 11:25 PM »
Hi,
I am having trouble to make eform to work with my host provider (DreamHost). I am required to use SMTP, with no authentication.
I have made the following changes to eform.inc.php to add SMTP method. The change was done to all sections that have the class PHPMailer in the eform.inc.php
...
$mail = new PHPMailer();
#$mail->IsMail();
$mail->IsSMTP();
$mail->Host = "localhost";
$mail->SMTPAuth = false;
$mail->Mailer = "smtp";
...
I am testing it with the default "contact us" page. hit on submit and receive the successful notification, but no email...
So I tested a similar approach (below) outside modx and phpmailer is able to send out emails. Any ideas? Any property or parameter I might be missing from the code above?
<?php
require("./manager/includes/controls/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(true); // set mailer to use SMTP
$mail->Host = "localhost"; // specify main and backup server
$mail->SMTPAuth = false; // turn off SMTP authentication
$mail->From = "test@domain";
$mail->FromName = "anyname";
$mail->AddAddress("
xyz@yahoo.com
", "Name1");
$mail->IsHTML(true); // set email format to HTM
$mail->Subject = "PHPmailer example";
$mail->Body = "This is a test of email 2";
if(!$mail->Send()){
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
?>
Thanks,
marcello
Logged
TobyL
Moderator
Posts: 1,006
Re: eform SMTP
«
Reply #1 on:
Dec 03, 2008, 08:35 AM »
In your test outside eForm you have
Code:
$mail->IsSMTP(true); // set mailer to use SMTP
and in the eForm code you have
Code:
$mail->IsSMTP();
Could that have something to do with it?
Logged
eForm
|
eForm support
|
eForm @ wiki
marcello
Jr. Member
Posts: 5
Re: eform SMTP
«
Reply #2 on:
Dec 03, 2008, 09:16 AM »
The "true" is not a required parameter. But I added it to the eform.inc.php and got same results.
thx
Logged
shamblett
Sr. Member
Posts: 499
Re: eform SMTP
«
Reply #3 on:
Dec 03, 2008, 09:28 AM »
Check your localhost mail logs when you hit submit, this should tell you how far the mail request is getting and what's happening to it.
Logged
Use MODx, or the cat gets it!
marcello
Jr. Member
Posts: 5
Re: eform SMTP
«
Reply #4 on:
Dec 03, 2008, 01:19 PM »
I confirmed with my host provider, and messages are not reaching the mailserver. The only messages found on the mailserver log are the ones I sent out using the test script outside Modx. So Modx is not reaching the mailserver... Any ideas on where else should I look? And I see no error message when submitting the form...
Code:
/var/log/mail.log.1.gz:Dec 2 20:13:29 pants postfix/smtp[18692]:
43BEB14C009: to=<xyx@yahoo.com>,
relay=e.mx.mail.yahoo.com[216.39.53.1], delay=1, status=sent (250 ok
dirdel)
/var/log/mail.log.1.gz:Dec 2 20:15:27 pants postfix/smtp[18693]:
ABC4414C008: to=<xyx@yahoo.com>,
relay=g.mx.mail.yahoo.com[206.190.53.191], delay=3, status=sent (250 ok
dirdel)
/var/log/mail.log.1.gz:Dec 2 20:17:02 pants postfix/smtp[18635]:
7335214C004: to=<xyx@yahoo.com>,
relay=c.mx.mail.yahoo.com[216.39.53.2], delay=300, status=sent (250 ok
dirdel)
/var/log/mail.log.1.gz:Dec 2 20:35:44 pants postfix/smtp[19535]:
1BF1214C00A: to=<xyx@yahoo.com>,
relay=d.mx.mail.yahoo.com[66.196.82.7], delay=1, status=sent (250 ok
dirdel)
Logged
shamblett
Sr. Member
Posts: 499
Re: eform SMTP
«
Reply #5 on:
Dec 03, 2008, 02:26 PM »
Ok, on the one that fails i.e in the internal MODx code you do this :-
Quote
$mail->Mailer = "smtp";
You don't do this on the example that works. I believe this sets what the smtp mail daemon is which may be wrong for your platform, delete ths line and try your e-form again, watching the logs of course.
Logged
Use MODx, or the cat gets it!
marcello
Jr. Member
Posts: 5
Re: eform SMTP
«
Reply #6 on:
Dec 03, 2008, 04:09 PM »
All the PHPMailer code look like this now. I have also updated to version 1.4.4.5
Code:
$mail = new PHPMailer();
#$mail->IsMail();
$mail->IsSMTP();
$mail->Host = "localhost";
$mail->SMTPAuth = false;
#$mail->Mailer = "smtp";
$mail->IsHTML($isHtml);
Same results. Nothing reaches the mailserver.
Just in case.. here is the contents of my form page.
Code:
[!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[(email_sender)]` &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46` !]
Thanks,
Logged
dev_cw
Testers
Posts: 4,025
Re: eform SMTP
«
Reply #7 on:
Dec 03, 2008, 04:44 PM »
Try changing &to=`[(email_sender)]` to &to=`youremail@address.com`
Logged
Shane Sponagle
|
[wiki] Snippet Call Anatomy
|
MODx Developer Blog
|
[nettuts] Working With a Content Management Framework: MODx
Something is happening here, but you don't know what it is.
Do you, Mr. Jones? - [bob dylan]
BobRay
Coding Team
Posts: 3,177
Re: eform SMTP
«
Reply #8 on:
Dec 03, 2008, 05:33 PM »
This is line 199 or the class.phpmailer.php file:
Code:
var $SMTPDebug = false;
I'm not sure if it will accept that as an argument, you may have to edit the line. It might give you a clue.
Logged
MODx info for newbies:
http://bobsguides.com/MODx.html
marcello
Jr. Member
Posts: 5
Re: eform SMTP
«
Reply #9 on:
Dec 03, 2008, 09:57 PM »
Thanks guys...
Changing &to=`[(email_sender)]` to &to=`youremail@address.com` worked fine. The email_sender was already defined in the configuration, and I could not understand why it was not being parsed.
So I checked the eform.inc.php once again and changed the following:
Code:
Version 1.4.4.5
Commented Line 458 -> #AddAddressToMailer($mail,"to",$to);
Added Line 459 -> AddAddressToMailer($mail,"to",$modx->config['emailsender']);
This way I do not have to hard code the email address on the contact form and eform will use the "to" from the email address (emailsender) defined under manager->tools->configuration->user->email address
Thank you very much.
Marcello
Logged
BobRay
Coding Team
Posts: 3,177
Re: eform SMTP
«
Reply #10 on:
Dec 03, 2008, 11:07 PM »
Good solution. Glad you got it sorted.
Logged
MODx info for newbies:
http://bobsguides.com/MODx.html
Pages: [
1
]
Go Up
Print
« Previous topic
Next topic »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Important News
=> Security Notices
-----------------------------
Commercial Support
-----------------------------
=> [CS] About Commercial Support
-----------------------------
Development & Coding
-----------------------------
=> Commercial Inquiries & Bounties
=> Core Code
===> MODx Next
===> xPDO
=> Module, Plugin & Snippet Creation and Modification
=> In Development
=> Templates
-----------------------------
Add-ons, Extensions & Elements
-----------------------------
=> Module, Plugin & Snippet Usage
=> General Repository Items Support
=> Navigation & Tagging/Taxonomy
===> Wayfinder & DropMenu
=> Creating & Repurposing Content
===> Ditto
===> Jot
===> Front-end Document Management
=> Users, Authentication & Personalization
===> WebloginPE
===> WebLogin, WebSignup and WebChangePwd
=> Rich Text Editors & File Browser
===> TinyMCE
===> FCKeditor
===> MCPuck File Browser
=> Forms, Form Processing & Anti-Spam
===> eForm
=> Search
===> AjaxSearch
=> E-business
=> Polls, Calendars, Address Book and Community
=> Third-party integrations
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> Backup & Versioning
===> Doc Finder
===> ManagerManager
===> PHx
=> Templates
-----------------------------
Support
-----------------------------
=> Release Support
===> 0.9.6.3
===> 0.9.6.2
===> 0.9.6.1
===> 0.9.6
===> 0.9.5 and earlier
=> General Support
===> MODx 101
===> E-Commerce, E-Marketing, Analytics & SEO
===> Hosting Experiences
===> IIS / Windows Hosting Issues
=> Documentation, Tips & Tricks
===> Documentation Suggestions & Corrections
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Webworker Lounge
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
International Support & Translations
-----------------------------
=> Internationalization
=> Bulgarian
===> Поддръжка
=====> Често задавани въпроси
=====> Инсталация
=====> Модули, Плъгини, Снипети и код
=====> Дизайн и Шаблони
===> Документация, Ръководства и Превод
=====> Документация
=====> Ръководства
=====> Превод
===> Общество
=====> Съобщения
=====> Представете се
=====> Представете сайта си
=====> Дискусии извън MODx
=> Chinese
=> Czech
===> Oznámení
=====> Důleitá oznámení/novinky
=====> Bezpečnost
===> Komunita
=====> Oznámení
=====> Představte se, prosím
=====> Ukázky práce
=====> Různé aneb cokoli co se jinam nehodí
===> Podpora
=====> FAQ (často kladené otázky)
=====> Instalace
=====> Moduly, pluginy, "snippets & code" (ablony zdrojových kódů)
=====> Design & ablony
===> Dokumentace, tutoriály (návody) a překlady
=====> Dokumentace
=====> Tutoriály (návody)
=====> Překlady (lokalizace)
=> Dutch
===> Ondersteuning
=====> Veel gestelde vragen
=====> Modules, Plugins, Snippets & Code
=====> Design & Templates
===> Documentatie, Tutorials en Vertalingen
=====> Documentatie
=====> Tutorials
=====> Vertalingen
===> Community
=====> Aankondigingen
=====> Stel jezelf voor
=====> Site Showcase
=====> De stamkroeg
=> Filipino
===> Suporta
=====> Kadalasang tanong
=====> Instalasyon
=====> Moduler, Maidadagdag, Karagdagang mga Code
=====> Desenyo at Templates
===> Dokumentasyon, Mga Turo, Mga Salin
=====> Dokumentasyon
=====> Mga Turo
=====> Mga Salin
===> Kumunidad
=====> Anunsyo
=====> Ipakilala ang sarili
=====> Ang Galing ng pinoy
=====> Tsismisan atbp
=> Finnish
===> Tuki
=====> UKK
=====> Asennus
=====> Moduulit, liitännäiset, koodinpätkät
=====> Ulkoasu/Sivustopohjat
===> Dokumentaatio, oppaat ja käännökset
=====> Dokumentaatio
=====> Käännökset
=====> Oppaat
===> Yhteisö
=====> Tiedotteet
=====> Esittele itsesi
=====> MODx sivustosi
=====> Kahvihuone
=> French
===> Support
=====> FAQ
=====> Installation
=====> Module, plugin, snippets
=====> Design/Templates
===> Documentation, Tutoriels et Traductions
=====> Documentation
=====> Traduction
=====> Tutoriels
===> Communauté
=====> Annonces
=====> Présentez vous
=====> Vos sites
=====> Le Bistrot Français
=> German
===> Support (de)
=====> FAQ (de)
=====> Installation (de)
=====> Module, Plugins, Snippets & Code (de)
=====> Design & Templates (de)
===> Dokumentation, Tutorials und Übersetzung
=====> Dokumentation
=====> Tutorials (de)
=====> Übersetzung
===> Community (de)
=====> Ankündigungen
=====> Stellt Euch vor
=====> Beispielseiten
=====> Off Topic / Verschiedenes
=> Hebrew
===> הכרזה
=====> חדשות חשובות
=====> אבטחה
===> תמיכה
=====> התקנה
=====> תיעוד, מדריכים ותרגומים
=====> עיצוב ותבניות
=====> שאלות נפוצות
===> תיעוד, מדריכים ותרגומים
=====> תיעוד
=====> מדריכים
=====> תרגומים
===> קהילה
=====> הודעות
=====> הצג את עצמך
=====> אתרים לדוגמא
=====> כללי
=> Irish
=> Italian
===> Supporto
=====> FAQ
=====> Installazione
=====> Moduli, Plugin, Snippet e altro codice
=====> Web Design e Template
===> Documentazione, Tutorial e Traduzione
=====> Documentazione
=====> Tutorial
=====> Traduzione
===> Comunitŕ
=====> Annunci
=====> Presentazioni
=====> Siti in vetrina
=====> Chiacchiere in libertŕ
=> Japanese
===> サポート
=====> 良くある質問
=====> インストール
=====> モジュール・プラグイン・スニペット・本体
=====> デザインやテンプレート
===> マニュアル・テュートリアル・翻訳
=====> マニュアル
=====> 事例集、テュートリアル
=====> 日本語化
===> コミュニティ
=====> お知らせ
=====> MODxサイト展示場
=====> 自己紹介
=====> 雑談
=====> 国産リソース
=> Persian - فارسي
===> پشتيباني
=====> راهنما
=====> نصب
=====> ماژول , پلاگین ها , کد ها و جزییات
=====> طراحی و قالب ها
===> مستند سازی , آموزش ها و ترجمه ها
=====> مستند سازی
=====> آموزش ها
=====> ترجمه ها
===> انجمن ها
=====> اخبار
=====> معرفی کردن خود
=====> نمایش دادن سایت ها
=====> بحث های عمومی و سایر موضوعات
=> Polish
===> Wsparcie
=====> FAQ
=====> Instalacja
=====> Moduły, pluginy, snipety i kod
=====> Wygląd i szablony
===> Dokumentacja, tutoriale i tłumaczenie
=====> Dokumentacja
=====> Tutoriale
=====> Tłumaczenie
===> Społeczność
=====> Ogłoszenia
=====> Przedstaw się
=====> Twój serwis WWW
=====> Hyde Park
=> Portuguese
===> Suporte
=====> FAQ - Dúvidas Frequentes
=====> Instalaçăo
=====> Módulos, Plugins, Snippets e Código
=====> Design e Templates
===> Documentaçăo, Guias e Traduçőes
=====> Documentaçăo
=====> Guias
=====> Traduçőes
===> Comunidade
=====> Anúncios
=====> Apresente-se!
=====> Bar da esquina (fora de tópico)
=====> Portfólio de Sites
=> Russian
===> Поддержка
=====> ЧАВО (FAQ)
=====> Установка
=====> Модули, плагины, сниппеты и код
=====> Дизайны и шаблоны
===> Документация, Уроки, Перевод
=====> Документация
=====> Уроки
=====> Перевод
===> Сообщество
=====> Объявления
=====> Представьтесь публике
=====> Галерея сайтов
=====> Диван
=> Scandanavian
===> Support
=====> Frĺgor och svar
=====> Installation
=====> Moduler, plugins, snippets och kod
=====> Design & sidmallar
===> Dokumentation, guider och översättningar
=====> Dokumentation
=====> Guider
=====> Översättningar
===> Webbgemenskap
=====> Meddelanden
=====> Presentera dig själv
=====> Visa upp dina webbsidor
=====> Ordet fritt
=> Slovak
=> Spanish
===> Soporte
=====> FAQ
=====> Instalación
=====> Modulos, Plugins, Snippets & Código
=====> Diseńo y plantillas
===> Documentación, Tutoriales y Traducciones
=====> Documentatción
=====> Tutoriales
=====> Traducciones
===> Comunidad
=====> Anuncios
=====> Presentaciones personales
=====> Muestra de sitios
=====> El Café
=> Swedish
=> TÜRKÇE (Turkish)
===> Destek
=====> SSS
=====> Kurulum
=====> Modüller, Pluginler, Snippetlar & Kodlar
=====> Dizayn & Temalar
===> Belgeleme, Eğitmenler ve Çeviri
=====> Belgeleme
=====> Eğitmenler
=====> Çeviri
===> Topluluk
=====> Duyurular
=====> Kendinizi Tanıtın
=====> Site Vitrini
=====> Konu Dışı