Feng Forum

Support => Getting Started => : nfultz January 30, 2009, 12:54:04 AM

: Email Notifications
: nfultz January 30, 2009, 12:54:04 AM
Hi I'm trying to setup e-mail notifications on a linux shared hosting account through GoDaddy. At first I had it set to use default php. When testing, it would tell me that the message was sent, however, I never received it. I tried switching to an smtp, but it keeps giving me the error, "Notifier failed to construct mailer object." Any ideas on what I might be doing wrong? I would prefer to use the default php mail function, but I'm not sure what I need to do to get it working.

Thanks for any help,
~Nathan
: Re: Email Notifications
: ignacio January 30, 2009, 09:16:41 AM
The default php mail configuration depends on your hosting provider (I don't think you can change it in any way), so you can try to contact them and ask them why it's not working. If the SMTP configuration is not working it must be some wrong SMTP settings or maybe your hosting provider doesn't let your programs to use certain TCP ports. Try contacting them about this.

Thanks for posting.
: Re: Email Notifications
: nfultz January 30, 2009, 11:28:28 AM
I contacted GoDaddy and they told me that the PHP function  is enabled on my shared hosting account. Is there something more specific that I could ask about or check on my server?  Secondly, I asked them about the SMTP info and they told me that the ports were on, but there was a slight change in the smtp server info I was supposed to put in. For my SMTP server I am supposed to enter "relay-hosting.secureserver.net" instead of "smptout.sevureserver.net", which is what I would normally enter in a pop3 mail client to use my e-mail. I changed that but still got the same error as before. (Notifier failed to construct mailer object.) Any other ideas or info you need from me?
: Re: Email Notifications
: nfultz January 30, 2009, 10:00:29 PM
I loaded a test php page up to my server to test the php mail function and it worked perfectly. This is what I used except for I used my own e-mail address instead of the example:
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);

// Send
mail('caffeinated@example.com', 'My Subject', $message);
?>
If this is working on my server than there must be something not set correctly in OpenGoo. What should I check? I really like OpenGoo and I want to be able to fix this so that it is useable. Any help would be appreciated.
: Re: Email Notifications (Work Around)
: nfultz January 31, 2009, 12:07:59 PM
Although this is not ideal, I found a work around to my problem. It seems to be an issue with the Swift library. So I basically bypassed it and everything is working now. This is what I did. Find the file applications/models/notifier/Notifier.class.php. Starting on line 393 I changed it to:
static function sendEmail($to, $from, $subject, $body = false, $type = 'text/plain', $encoding = 'utf-8') {
      return mail($to,$subject,$body,'From: The Valley Worship Center <'.$from.">\r\n");
      //Env::useLibrary('swift');

      //$mailer = self::getMailer();
      //if(!($mailer instanceof Swift)) {
         //throw new NotifierConnectionError();
      //} // if

      //if (config_option("mail_transport", self::MAIL_TRANSPORT_MAIL) == self::MAIL_TRANSPORT_SMTP &&
            //config_option("smtp_authenticate", false)) {
         //$from = self::prepareEmailAddress(config_option("smtp_username", $from), $from);
      //}
      //$result = $mailer->send($to, $from, $subject, $body, $type, $encoding);
      //$mailer->close();

      //return $result;
   }  //sendEmail

This worked for me, although, I'm sure this will be a problem when I upgrade. I'm currently using version 1.1. For more information on this go to http://www.activecollab.com/forums/topic/1063/2/ that is where I read about this problem.
: Re: Email Notifications
: Zygote March 10, 2009, 11:29:41 AM
I've had similar problems to nfultz but different in as much as my test emails go out and are received but both notifications and mass mails aren't received despite being apparently successfully sent. I'm using default PHP settings as Mail Transport (switching to an SMTP server gave the same "Notifier failed to construct mailer object." as above - the various workarounds I've found here didn't help).

On sending a mass mail, I'm told "Email has been sent" but log.php says:

Session "default" started at 2009-03-10T14:03:10+0000
#1 ERROR: Error: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 501 5.5.4 Invalid Address in 'G:\websites\****\htdocs\group\library\swift\lib\Swift\Stream\MailProxy.php' on line 374 (error code: 2)
Time since start: 0.210499048233 seconds

Any help please?

EDIT: I'm using version 1.2.1
: Re: Email Notifications
: zaro March 28, 2010, 08:39:38 AM
Hi Everyone!

I am using FengOffice 1.6.2 on GoDaddy.

The e-mail notifications do not work. I have tried the workaround of nfultz, but it didn't work.

Does anyone else experience similar problems on GoDaddy shared hosting?

Thanks!
Zaro
: Re: Email Notifications
: MadJik March 29, 2010, 01:55:56 PM
Just my turn to ask for help...
The e-mail notifications do not work for me too!

I've find this in the messages log :

httpd: smtp.c (371) Failed to connect to :25
httpd: /source/php-5.2.10/ext/standard/syno_mail.c (578) Failed to send mail.

But I don't know how to read it and solve the problem.

Thanks for help...
: Re: Email Notifications
: allenlook March 30, 2010, 08:45:50 PM
It looks like the email module is trying to connect to nothing but port 25, eg. no address?  That is a guess on my part.

Does GoDaddy use the standard port 25 for email?  Is there somewhere you can specify the name of your mail server, by IP address perhaps instead of by name, and test that you have access to that IP:Port combination?
: Re: Email Notifications
: MadJik April 09, 2010, 11:13:52 AM
I've several FO installed on the same server.
One is sending notification, another one is not! Only emails are working.

Could it be a problem with some kind of default user authorization?

Any tip is welcome.

Thanks.

MadJik
: Re: Email Notifications
: allenlook April 13, 2010, 09:44:40 AM
Even though they are running on the same server, do they have the same IP address and port?  If you are using Exchange Server for instance, I know it is possible to only allow a certain list of IP/port combinations to relay mail, and you might have to add the second FengOffice instance to your "whitelist".
: Re: Email Notifications
: MadJik April 20, 2010, 06:01:45 AM
I'm working here with a timesharing contract so I could be slow to answer...sorry.
----
BTW our Feng Office are installed on a Synology Server.
It has only one IP address as each FO is a sub-site like
www.my-web.com/my-sub-site-office-a
www.my-web.com/my-sub-site-office-b

We use the Mail Station provided with the Syno and the setting are the same for every FO.

From the FO's email tab I'm able to send/receive emails. But when I create a task, I check the box to receive a notification and nothing!

Is there any log I could dig into to try to catch the pb?

Thanks.
: Re: Email Notifications
: MadJik April 23, 2010, 05:25:39 AM
I've created a new FO from scratch, the notification is working well when I add a task and delete it.

I've export/import the database from the original to the new FO.
Then the notification doesn't work any more.
I've only changed the data in the database.

That means the problem comes from a setting in the database somewhere.
I've checked :
- og_config_option
- og_mail_accounts
and I've made some changes (ex. to have the same smtp settings).

Without success (yet!)  :'(

Where should I have a look ?
: Re: Email Notifications
: MadJik April 23, 2010, 09:11:05 AM
Sorry for multi post, but the situation is changing...

----------------

I've found what could be the problem :

The email address of the creator was unknown to the localhost list of account...
We first installed the FO on the web server of our ISP then we decided to have our own server for that and we moved the database.
So in this case it is important to update the email of the admin...
: Re: Email Notifications
: tinsterman April 25, 2010, 02:10:56 PM
Hi,
I found out the problem with godaddy, as it also happened with a wordpress installation I had.

Firstly you must have an email account set up on the godaddy hosting. admin@yourdomain.com or which ever email you need.

That email has to be associated with your company info.

Then in the Mailing Configuration set:
mail transport to SMTP Server
Mail Server to relay-hosting.secureserver.net
SMTP Port 25
SMTP Address: leave blank
SMTP Authentication: No
SMTP Username and Password: Leave Blank
SMTP Secure: No

This should work. Forget calling GoDaddy for support.  They suck! I'm going to move my hosting soon.



Hi Everyone!

I am using FengOffice 1.6.2 on GoDaddy.

The e-mail notifications do not work. I have tried the workaround of nfultz, but it didn't work.

Does anyone else experience similar problems on GoDaddy shared hosting?

Thanks!
Zaro
: Re: Email Notifications
: ckhung December 13, 2012, 11:50:27 PM
Hello, I landed here by googling "httpd syno_mail.c Failed to send mail" and found that MadJik has the same problem as I do with a synology server. After asking their tech support I solved the problem and thought it might help other people who google the same thing so i post their answer here.

You need to go to the "control center"  ==> "notification configuration" ==> "e-mail" tab to set up the system mail notification. (I am using a Chinese version so the above texts are just English approximations.) (failed to attach a screenshot.)