Trouble using external smtp server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble using external smtp server

Matt Morgan
I have a little wiki set up on a home server that is connected to a
typical consumer ISP account. Lots of smtp servers reject mail that
comes straight from this server, so I usually set things up to mail
through another smtp server I have smtp-auth access to.

I found this page:

http://mail.wikipedia.org/pipermail/mediawiki-cvs/2004-February/000414.html

which explains that I can set up $wgSMTP as an array, like so:

$wgSMTP = array (  "host" => "smtp.wherever.com",
                       "IDHost" => "mail.wikipedia.org",
                       "port" => "25",
                       "auth" => true,
                       "username" => "mailID",
                       "password" => "mailPswd");

(example only; I used real values for my setup) and then
UserMailer.php should send via the server that I specify.

Wherever I set $wgSMTP (I tried LocalSettings.php,
DefaultSettings.php, and in the function itself in UserMail.php--I
realize they should all have the same effect and that LocalSettings is
preferred), mail seems to break. For example, when I try to mail
myself my password on the login/create account page, I just get a
blank page (after clicking the "mail me a new password" button) and no
mail ever arrives.

Any thoughts? Where can I look for errors, etc., or how else can I test easily?

Thanks,
Matt
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Trouble using external smtp server

Brion Vibber
Matt Morgan wrote:
> Wherever I set $wgSMTP (I tried LocalSettings.php,
> DefaultSettings.php, and in the function itself in UserMail.php--I
> realize they should all have the same effect and that LocalSettings is
> preferred), mail seems to break. For example, when I try to mail
> myself my password on the login/create account page, I just get a
> blank page (after clicking the "mail me a new password" button) and no
> mail ever arrives.

Check PHP's error log. (Try to configure one if you can.) It's probably showing
a fatal error because it can't find PEAR::Mail.

Make sure it's installed, and add the directory into the include_path that's set
in LocalSettings.php.

-- brion vibber (brion @ pobox.com)


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

signature.asc (257 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Trouble using external smtp server

Matt Morgan
On 2/7/06, Brion Vibber <[hidden email]> wrote:

> Matt Morgan wrote:
> > Wherever I set $wgSMTP (I tried LocalSettings.php,
> > DefaultSettings.php, and in the function itself in UserMail.php--I
> > realize they should all have the same effect and that LocalSettings is
> > preferred), mail seems to break. For example, when I try to mail
> > myself my password on the login/create account page, I just get a
> > blank page (after clicking the "mail me a new password" button) and no
> > mail ever arrives.
>
> Check PHP's error log. (Try to configure one if you can.) It's probably showing
> a fatal error because it can't find PEAR::Mail.
>
> Make sure it's installed, and add the directory into the include_path that's set
> in LocalSettings.php.

Yes, that was it! Thanks.

--Matt
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l