hi there,
i'm trying to send email from different smtp with authentication in the same site...
i managed to do it on my development local machine, calling from a snippet the PEAR Mail.php
the problem is that my hosting provider doesn't install the PEAR Mail, nor Mime, packages, so i receive this disturbing error: Warning: require_once(Mail.php): failed to open stream: No such file or directory in /htdocs/public/www/modx/core/cache/includes/elements/modsnippet/9.include.cache.php on line 23 Fatal error: require_once(): Failed opening required 'Mail.php' (include_path='.:/usr/share/php:/usr/share/pear') in /htdocs/public/www/modx/core/cache/includes/elements/modsnippet/9.include.cache.php on line 23
i also need to include attachments in those emails.
can someone suggest me a way to solve this?
thanks in advance
airone
You don't have to install PHPMailer, it is included in the modx package.
ok, now i managed to send email with different smtp params, creating a custom hook to handle mails using phpmailer.
now i have another problem: if i use the recaptcha hook, i would expect that if i don't pass the captcha, the form submission would not send the email but it actually does.
am i forgetting something? i tried to understand where formit manages errors in filling the captcha, but i had no luck.
any suggestion?
as soon as i've fixed the hook i'll post it here.
thanx again
Do you have the recaptcha hook before your custom hook in the snippet call? The hooks are processed in the order they are written in the snippet call.