Page 1 of 2
Changing Outgoing Email Server
Posted: Mon Mar 20, 2006 9:18 pm
by dadepfan
Hi everyone
Is there any way to change the outgoing email server that Serendipity uses? Because I have a dynamic IP address, I have to use a different mail server for outgoing mail, or else a lot does not get delivered (dynamic IPs are not trusted).
I'm running my own mail server, but only using it for incoming.
Thanks,
D.
Re: Changing Outgoing Email Server
Posted: Tue Mar 21, 2006 10:17 am
by garvinhicking
You must configure that within your PHP/Sendmail configuration. Serendipity just uses what you configured in your PHP, as it simply utilizes the PHP mail() function.
Best regards,
Garvin
Re: Changing Outgoing Email Server
Posted: Tue Mar 21, 2006 10:26 am
by andre
garvinhicking wrote:You must configure that within your PHP/Sendmail configuration. Serendipity just uses what you configured in your PHP, as it simply utilizes the PHP mail() function
In addition:
I suppose it should be possible to set this within your php code via
ini_set() , modify the values:
SMTP, std: "localhost" , smtp_port, std. "25".
E.g. in serendipity_config_local.inc.php , start after:
Code: Select all
// You can place your own special variables after here:
Andre
PS: Untestet !
Posted: Tue Mar 21, 2006 6:26 pm
by dadepfan
Thanks folks - good information. I'll give it a try.

Posted: Fri Mar 24, 2006 12:31 am
by dadepfan
BTY - I'm still trying to accomplish this. I do not run Sendmail, but Surgemail instead.
I have the user self-regristration plugin installed, but the email never gets delivered when I test it. SO, I thought it might be the dynamic IP address problem.
So, any ideas on what should be added to which files? PHP.ini? Settings in Serendipity? Settings in Surgemail??
D.
Posted: Fri Mar 24, 2006 9:05 am
by andre
dadepfan wrote:BTY - I'm still trying to accomplish this. I do not run Sendmail, but Surgemail instead.
D.
I have used qmail, sendmail and postfix, but only lack of knowledge to surgemail & the plugin, but let's try to investigate like this:
configure mails to be send to root@localhost ,
register with root@localhost (if an email adress validation refuses to accept this, try
root@yourhostname.yourfakedomain ). ( the cmd hostname should name you this ).
Now check root`s mail , if empty , then check your surgemail logfile , should be smthng like /var/log/mail or /var/log/surgemail/... while sending a mail.
(Maybe you need to activate the email delivery somewhere.)
Post results.

If we have no new ideas , i'll check the plugin and test it with my postfix here.
Andre
Plugin still not working
Posted: Sat Mar 25, 2006 7:29 am
by dadepfan
I've tried adding the root user with an email address of root@localhost and root@mydomain. I've also tried bogus usernames at mydomain and at localhost.
Then I've looked at several of the SurgeMail logs (mail.log, smtp.log, send.log, mon.log, etc.) in the /usr/local/surgemail/ directory. In these log files, which are constantly being updated, I searched for "root," "localhost," and the bogus user names I tried. There is no mention of any of these.
It is as if Serendipity and SurgeMail are totally disconnected.
Here is some info from the SurgeMail site:
SurgeMail replaces the sendmail binary with a sendmail stub, this basically pretends to be sendmail and redirects everything to SurgeMail. Your programs should not have any problems but sometimes there are.
* Create a file called sendmail.ini in the surgemail directory
* in this file add the following settings
host 127.0.0.1
debug true
Then try sending a message with the sendmail binary
/usr/sbin/sendmail
From: yourusername@yourdomain
To: user@whateverdomain
Subject: test
This is a test
.
I did set up the file as suggested, but was unable to follow those instructions for sending a message.
If I could just get Serendipity to send directly to an enternal SMTP server (with a username and password), bypassing the local mail server completely, that would solve the problem (I have an account with an external SMTP server for sending mail from my mail client.
Re: Plugin still not working
Posted: Sun Mar 26, 2006 10:10 pm
by garvinhicking
Hi!
As metioned above - Serendipity just used the SMTP setup of PHP. Just change your php.ini to change the SMTP server and it should work.
You could also try to just setup a port forward of your local port 25 to the foreign server's port 25...but all in all, it does not depend on Serendipity's setup.
Regards,
Garvin
Posted: Tue Mar 28, 2006 1:56 am
by dadepfan
Is there a way to have the PHP mail function point directly to an external SMTP server for outgoing messages, including authentication (user name and password)? If so, please post some of the syntax, and tell me where to put it (which file and where in the file).
After a change like that, does PHP have to be compiled again?
Can you tell I'm still a newbie at this stuff??
D.
Posted: Tue Mar 28, 2006 4:39 am
by judebert
Serendipity uses the PHP mail() function, described here:
http://us3.php.net/mail. It also tells you which options can be set in the php.ini to redirect to a foreign server.
The location of your php.ini file depends on the server configuration. Often it can be found in the webserver root.
Kinda desperate here...
Posted: Sun May 14, 2006 4:27 am
by JessaLu
As of Friday I stopped receiving comment notifications. According to my hosting company I need to change how the emails are sent. They are being of practically no help - as of right now they aren't even responding to my emails. They won't check the php.ini file for me or tell me where to find it so I can check it myself. (I've looked through every file available to me on my site and can't find it) I put the above string into the serendipity_config_local.inc.php file and received an error. My file looks like this:
<?php
/*
Serendipity configuration file
Written on Fri, 28 Apr 2006 13:57:59 -0500
*/
$serendipity['versionInstalled'] = '0.9.1';
$serendipity['dbName'] = 'yarncour_ser3';
$serendipity['dbPrefix'] = 'serendipity_';
$serendipity['dbHost'] = 'localhost';
$serendipity['dbUser'] = 'yarncour_ser3';
$serendipity['dbPass'] = '';
$serendipity['dbType'] = 'mysql';
$serendipity['dbPersistent'] = false;
// End of Serendipity configuration file
// You can place your own special variables after here:
ini_set("SMTP", std: "mail.yarncourtesans.com" , smtp_port,std."25")
?>
and the error I receive is this:
Parse error: parse error, unexpected ':' in /home/yarncour/public_html/jessaluknits/serendipity_config_local.inc.php on line 19
I am an idiot when it comes to this stuff so any and all help is much appreciated. I really don't want to change hosts but if I have to, I will.
Thanks

Posted: Sun May 14, 2006 5:51 am
by mgroeninger
I think you are close... but they need to be in different statements:
Code: Select all
ini_set("SMTP","mail.yarncourtesans.com");
ini_set("smtp_port","25");
Just be aware that if you change any of the blog settings this file will be recreated and any changes you have made will be lost.
EDIT: And you may want to edit that post and remove your database password...
Posted: Sun May 14, 2006 6:03 am
by JessaLu
Thank you for the help, I put in those two lines and I'm no longer getting an error.
I'm still not getting emails, either. Frustrating.
(I also removed my password, thanks for the heads-up. Can you tell I'm upset over this?)
Posted: Sun May 14, 2006 6:51 am
by mgroeninger
Ok you can try something like adding:
Be aware: This line turns on the error output. If you put it in your local config file it will show all errors (including things like passwords and such) your site generates... You should only use it for a short period of time...
You can then try adding a comment and see if any errors are reported...
Or you could add something like:
Code: Select all
ini_set("log_errors",true);
ini_set("error_log","path/to/php.log");
This will log all errors to the file you specify, which you can then check without fear of other people seeing the errors.
Posted: Sun May 14, 2006 3:00 pm
by garvinhicking
Also check if in your serendipity configuration you specified the "Blog's E-Mail address" with a valid address from your blog?
Regards,
Garvin