Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kalkun sms to email plugin setup #171

Open
rajbps opened this issue Apr 23, 2016 · 17 comments
Open

kalkun sms to email plugin setup #171

rajbps opened this issue Apr 23, 2016 · 17 comments

Comments

@rajbps
Copy link

rajbps commented Apr 23, 2016

Hiya,

How do you configure the sms to email plugin please?

Also is it possible that once configures if user A sends in an sms when its forwarded to the email, it creates a subject line as phonenumber@domain.com

I am trying to get this to go to otrs which is a ticketing system for IT.

I can set up filters in otrs to filter what emails comes in and goes to specific customer queue and such a subject line will allow me to filter that.

Regards,

Raj

@rajbps
Copy link
Author

rajbps commented May 4, 2016

Hi Guys,

Can anyone assist. I am willing to send beer money to the one that provides a successful solution.

Raj

@kingster
Copy link
Collaborator

kingster commented May 5, 2016

Hi

Its very easy to configure that. You would need to modify the plugin file on your host as to create the subject line accordingly

In file sms_to_email.php

For configuration update the section under sms_to_email_initialize to appropriate values.

For changing the logic of subject line need to change the subject line generation

$CI->email->subject($config['mail_subject']);

to

$CI->email->subject($from."@domain.com");

That's all.

@rajbps
Copy link
Author

rajbps commented May 5, 2016

Hi Kinshuk,

Thanks for the reply.

Had not used kalkun for a month or so and went to make the changes but now will not get any sms in at all.

I have restored the server to a known working point but still will not get any sms in the inbox.

I can send sms no problem.

Where to you suggest to begin troubleshooting please?

I can see the sms coming in as I have set auto reply on and I can see the count of send sms going up everytime I get an sms but just will not show up

Cheers,

Rajbps

From: Kinshuk Bairagi [mailto:notifications@github.com]
Sent: 05 May 2016 19:44
To: back2arie/Kalkun Kalkun@noreply.github.com
Cc: Raj Raj@businessparksolutions.com; Author author@noreply.github.com
Subject: Re: [back2arie/Kalkun] kalkun sms to email plugin setup (#171)

Hi

Its very easy to configure that. You would need to modify the plugin file on your host as to create the subject line accordingly

In file sms_to_email.phphttps://github.com/back2arie/Kalkun/blob/master/application/plugins/sms_to_email/sms_to_email.php

For configuration update the section under sms_to_email_initialize to appropriate values.

For changing the logic of subject line need to change the subject line generation

$CI->email->subject($config['mail_subject']);

to

$CI->email->subject($from."@domain.com");

That's all.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/171#issuecomment-217239420

@rajbps
Copy link
Author

rajbps commented May 5, 2016

Also I never get the auto reply sms

Here is what is in syslog:

May 5 22:12:14 bpssms gammu-smsd[1149]: Starting phone communication...
May 5 22:12:22 bpssms gammu-smsd[1149]: Soft reset return code: Function not supported by phone. (NOTSUPPORTED[21])
May 5 22:12:28 bpssms gammu-smsd[1149]: Received message from: +44(mynumber)
May 5 22:12:28 bpssms gammu-smsd[1149]: Read 1 messages
May 5 22:12:28 bpssms gammu-smsd[1149]: Execute SQL: INSERT INTO inbox (ReceivingDateTime, Text, SenderNumber, Coding, SMSCNumber, UDH, Class, TextDecoded, RecipientID) VALUES ('2016-05-05 22:12:13', '004E006F00700065', '+44(mynumber)', 'Default_No_Compression', '+447785016005', '', -1, 'Nope', '')
May 5 22:12:28 bpssms gammu-smsd[1149]: Inserted message id 20
May 5 22:12:28 bpssms gammu-smsd[1149]: Execute SQL: UPDATE phones SET Received = Received + 1 WHERE IMEI = 'changed for forum'
May 5 22:12:28 bpssms gammu-smsd[1385]: Starting run on receive: /var/www/html/kalkun/scripts/daemon.sh 20
May 5 22:12:28 bpssms gammu-smsd[1149]: Process finished successfully
May 5 22:12:28 bpssms gammu-smsd[1149]: Execute SQL: SELECT ID, InsertIntoDB, SendingDateTime, SenderID FROM outbox WHERE SendingDateTime < NOW() AND SendingTimeOut < NOW() AND SendBefore >= CURTIME() AND SendAfter <= CURTIME() AND ( SenderID is NULL OR SenderID = '' OR SenderID = '' ) ORDER BY InsertIntoDB ASC LIMIT 1
May 5 22:12:28 bpssms gammu-smsd[1149]: Execute SQL: UPDATE phones SET TimeOut= (NOW() + INTERVAL 10 SECOND) + 0, Battery = 100, Signal = 66 WHERE IMEI = 'changed for forum'
May 5 22:12:44 bpssms gammu-smsd[1149]: Execute SQL: UPDATE phones SET TimeOut= (NOW() + INTERVAL 10 SECOND) + 0, Battery = 100, Signal = 66 WHERE IMEI = 'changed for forum'
May 5 22:12:58 bpssms gammu-smsd[1149]: Execute SQL: SELECT ID, InsertIntoDB, SendingDateTime, SenderID FROM outbox WHERE SendingDateTime < NOW() AND SendingTimeOut < NOW() AND SendBefore >= CURTIME() AND SendAfter <= CURTIME() AND ( SenderID is NULL OR SenderID = '' OR SenderID = '' ) ORDER BY InsertIntoDB ASC LIMIT 1
May 5 22:12:58 bpssms gammu-smsd[1149]: Execute SQL: UPDATE outbox SET SendingTimeOut = (NOW() + INTERVAL 60 SECOND) + 0 WHERE ID = '18' AND (SendingTimeOut < NOW() OR SendingTimeOut IS NULL)
May 5 22:12:58 bpssms gammu-smsd[1149]: Execute SQL: SELECT Text, Coding, UDH, Class, TextDecoded, ID, DestinationNumber, MultiPart, RelativeValidity, DeliveryReport, CreatorID FROM outbox WHERE ID='18'
May 5 22:12:58 bpssms gammu-smsd[1149]: Message: Thanks for sending me the message
May 5 22:12:58 bpssms gammu-smsd[1149]: New message to send: 18
May 5 22:12:58 bpssms gammu-smsd[1149]: Execute SQL: UPDATE outbox SET SendingTimeOut = (NOW() + INTERVAL 60 SECOND) + 0 WHERE ID = '18' AND (SendingTimeOut < NOW() OR SendingTimeOut IS NULL)
May 5 22:13:00 bpssms gammu-smsd[1149]: Execute SQL: UPDATE outbox SET SendingTimeOut = (NOW() + INTERVAL 60 SECOND) + 0 WHERE ID = '18' AND (SendingTimeOut < NOW() OR SendingTimeOut IS NULL)
May 5 22:13:00 bpssms gammu-smsd[1149]: SMS sent on device: "/dev/ttyUSB2" status=0, reference=79
May 5 22:13:00 bpssms gammu-smsd[1149]: Transmitted 18 (total: 1) to Vodafone
May 5 22:13:00 bpssms gammu-smsd[1149]: Execute SQL: INSERT INTO sentitems (CreatorID, ID, SequencePosition, Status, SendingDateTime, SMSCNumber, TPMR, SenderID, Text, DestinationNumber, Coding, UDH, Class, TextDecoded, InsertIntoDB, RelativeValidity) VALUES ('', '18', 1, 'SendingOKNoReport', NOW(), '+447785016005', 79, '', '005400680061006E006B007300200066006F0072002000730065006E00640069006E006700200042007500730069006E0065007300730020005000610072006B00200053006F006C007500740069006F006E00730020004C0074006400200053007500700070006F0072007400200074006800650020006D006500730073006100670065', 'Vodafone', 'Default_No_Compression', '', 1, 'Thanks for sending me the message', '2016-05-05 22:12:28', 255)
May 5 22:13:00 bpssms gammu-smsd[1149]: Execute SQL: UPDATE phones SET Sent= Sent + 1 WHERE IMEI = 'changed for forum'
May 5 22:13:00 bpssms gammu-smsd[1149]: Execute SQL: DELETE FROM outbox WHERE ID='18'
May 5 22:13:00 bpssms gammu-smsd[1149]: Execute SQL: DELETE FROM outbox_multipart WHERE ID='18'
May 5 22:13:00 bpssms gammu-smsd[1149]: Execute SQL: UPDATE phones SET TimeOut= (NOW() + INTERVAL 10 SECOND) + 0, Battery = 100, Signal = 66 WHERE IMEI = 'changed for forum'
May 5 22:13:02 bpssms gammu-smsd[1149]: Execute SQL: SELECT ID, InsertIntoDB, SendingDateTime, SenderID FROM outbox WHERE SendingDateTime < NOW() AND SendingTimeOut < NOW() AND SendBefore >= CURTIME() AND SendAfter <= CURTIME() AND ( SenderID is NULL OR SenderID = '' OR SenderID = '' ) ORDER BY InsertIntoDB ASC LIMIT 1
May 5 22:13:16 bpssms gammu-smsd[1149]: Execute SQL: UPDATE phones SET TimeOut= (NOW() + INTERVAL 10 SECOND) + 0, Battery = 100, Signal = 66 WHERE IMEI = 'changed for forum'
May 5 22:13:32 bpssms gammu-smsd[1149]: Execute SQL: SELECT ID, InsertIntoDB, SendingDateTime, SenderID FROM outbox WHERE SendingDateTime < NOW() AND SendingTimeOut < NOW() AND SendBefore >= CURTIME() AND SendAfter <= CURTIME() AND ( SenderID is NULL OR SenderID = '' OR SenderID = '' ) ORDER BY InsertIntoDB ASC LIMIT 1
May 5 22:13:32 bpssms gammu-smsd[1149]: Execute SQL: UPDATE phones SET TimeOut= (NOW() + INTERVAL 10 SECOND) + 0, Battery = 100, Signal = 66 WHERE IMEI = 'changed for forum'
May 5 22:13:45 bpssms systemd-timesyncd[436]: Timed out waiting for reply from 91.189.89.199:123 (ntp.ubuntu.com).
May 5 22:13:48 bpssms gammu-smsd[1149]: Execute SQL: UPDATE phones SET TimeOut= (NOW() + INTERVAL 10 SECOND) + 0, Battery = 100, Signal = 66 WHERE IMEI = 'changed for forum'
May 5 22:13:55 bpssms systemd-timesyncd[436]: Timed out waiting for reply from 91.189.94.4:123 (ntp.ubuntu.com).

Cheers,

rajbps

From: Kinshuk Bairagi [mailto:notifications@github.com]
Sent: 05 May 2016 19:44
To: back2arie/Kalkun Kalkun@noreply.github.com
Cc: Raj Raj@businessparksolutions.com; Author author@noreply.github.com
Subject: Re: [back2arie/Kalkun] kalkun sms to email plugin setup (#171)

Hi

Its very easy to configure that. You would need to modify the plugin file on your host as to create the subject line accordingly

In file sms_to_email.phphttps://github.com/back2arie/Kalkun/blob/master/application/plugins/sms_to_email/sms_to_email.php

For configuration update the section under sms_to_email_initialize to appropriate values.

For changing the logic of subject line need to change the subject line generation

$CI->email->subject($config['mail_subject']);

to

$CI->email->subject($from."@domain.com");

That's all.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/171#issuecomment-217239420

@rajbps
Copy link
Author

rajbps commented May 5, 2016

Ok managed to recover the server from an older backup and i can now send and recieve sms again.
I installed the sms to email plugin with the following config :

function sms_to_email_initialize()

{
$config['protocol'] = 'smtp';
$config['smtp_host'] = "mail.domain.com";
$config['smtp_port'] = "25";
$config['smtp_user'] = "support@domain.com";
$config['smtp_pass'] = "the password";
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$config['mail_from'] = 'support@domain.com';
$config['mail_subject'] = 'Kalkun New SMS';
return $config;

The email server is an exchange 2013 box.

i can find any logs to see what is actually happening jsu never gets the emails .

I have change the following file index.php to be as 👍

| For more info visit: http://www.php.net/error_reporting
|
*/
error_reporting(-1);
error_reporting(E_ALL);

// Change this to your timezone
// Available timezone: http://www.php.net/manual/en/timezones.php
// date_default_timezone_set('Asia/Jakarta');  

/*

But still nothing much in syslog.

Please advise as I am looking forward to use kalkun

Regards,

Rajbps

@kingster
Copy link
Collaborator

kingster commented May 6, 2016

Kalkun needs an email server which supports smtp protocol. Is your email
server configured to accept mail via smtp?

Also did you enable the plugin from kalkun settings?

Regards
Kinshuk Bairagi

  • Sent from Mobile

Ok managed to recover the server from an older backup and i can now send
and recieve sms again.
I installed the sms to email plugin with the following config :

function sms_to_email_initialize()

{
$config['protocol'] = 'smtp';
$config['smtp_host'] = "mail.domain.com";
$config['smtp_port'] = "25";
$config['smtp_user'] = "support@domain.com";
$config['smtp_pass'] = "the password";
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$config['mail_from'] = 'support@domain.com';
$config['mail_subject'] = 'Kalkun New SMS';
return $config;

The email server is an exchange 2013 box.

i can find any logs to see what is actually happening jsu never gets the
emails .

I have change the following file index.php to be as [image: 👍]

| For more info visit: http://www.php.net/error_reporting
|
*/
error_reporting(-1);
error_reporting(E_ALL);

// Change this to your timezone
// Available timezone: http://www.php.net/manual/en/timezones.php
// date_default_timezone_set('Asia/Jakarta');

/*

But still nothing much in syslog.

Please advise as I am looking forward to use kalkun

Regards,

Rajbps


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#171 (comment)

@rajbps
Copy link
Author

rajbps commented May 6, 2016

How can i get the logs to see what is happening with the email bit. Currently I am unsure of what the issue is. Exchange 2013 does do smpt.

Please advise if there is a way to make kalkun /the plugin throw out the logs.

Regards,

rajbps

@kingster
Copy link
Collaborator

kingster commented May 9, 2016

Can you follow this stack overflow link to enable debug messages and see if the errors logs are generated?

@rajbps
Copy link
Author

rajbps commented May 10, 2016

hiya,

I have changed the following 2 line in the php.ini file :
display_errors = On
error_reporting = E_ALL

I made the modification to 2 php.ini files located in

/etc/php5/cli/php.ini
and
/etc/php5/apache2/php.ini

Then I looked at the logs in
/var/log/apache2/error.log

here is the output:

[Wed Mar 16 22:02:16.232503 2016] [mpm_prefork:notice] [pid 1003] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Wed Mar 16 22:02:16.232797 2016] [core:notice] [pid 1003] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 16 22:17:06.491580 2016] [mpm_prefork:notice] [pid 1003] AH00169: caught SIGTERM, shutting down
[Wed Mar 16 22:17:31.521274 2016] [mpm_prefork:notice] [pid 949] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Wed Mar 16 22:17:31.522061 2016] [core:notice] [pid 949] AH00094: Command line: '/usr/sbin/apache2'
[Thu Mar 17 04:02:48.336587 2016] [mpm_prefork:notice] [pid 949] AH00169: caught SIGTERM, shutting down
[Thu Mar 17 04:02:49.343757 2016] [mpm_prefork:notice] [pid 3462] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 04:02:49.344115 2016] [core:notice] [pid 3462] AH00094: Command line: '/usr/sbin/apache2'
[Thu Mar 17 04:23:08.661182 2016] [mpm_prefork:notice] [pid 1023] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 04:23:08.662030 2016] [core:notice] [pid 1023] AH00094: Command line: '/usr/sbin/apache2'
[Thu Mar 17 14:06:25.470816 2016] [mpm_prefork:notice] [pid 1023] AH00169: caught SIGTERM, shutting down
[Thu Mar 17 14:07:07.281197 2016] [mpm_prefork:notice] [pid 1052] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 14:07:07.282186 2016] [core:notice] [pid 1052] AH00094: Command line: '/usr/sbin/apache2'
[Thu Mar 17 14:12:28.089427 2016] [mpm_prefork:notice] [pid 1052] AH00169: caught SIGTERM, shutting down
[Thu Mar 17 14:13:00.064063 2016] [mpm_prefork:notice] [pid 1020] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 14:13:00.067012 2016] [core:notice] [pid 1020] AH00094: Command line: '/usr/sbin/apache2'
[Thu Mar 17 14:27:56.735556 2016] [mpm_prefork:notice] [pid 1020] AH00169: caught SIGTERM, shutting down
[Thu Mar 17 14:28:31.147074 2016] [mpm_prefork:notice] [pid 1017] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 14:28:31.148093 2016] [core:notice] [pid 1017] AH00094: Command line: '/usr/sbin/apache2'
[Thu Mar 17 14:44:54.870132 2016] [mpm_prefork:notice] [pid 1017] AH00169: caught SIGTERM, shutting down
[Thu Mar 17 15:24:35.613532 2016] [mpm_prefork:notice] [pid 1006] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 15:24:35.623712 2016] [core:notice] [pid 1006] AH00094: Command line: '/usr/sbin/apache2'
[Thu Mar 17 21:40:08.280732 2016] [mpm_prefork:notice] [pid 1006] AH00169: caught SIGTERM, shutting down
[Thu Mar 17 21:40:43.875650 2016] [mpm_prefork:notice] [pid 968] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 21:40:43.877984 2016] [core:notice] [pid 968] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 18 12:36:54.846532 2016] [mpm_prefork:notice] [pid 968] AH00169: caught SIGTERM, shutting down
[Fri Mar 18 12:37:20.327136 2016] [mpm_prefork:notice] [pid 960] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Fri Mar 18 12:37:20.330797 2016] [core:notice] [pid 960] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 18 13:20:39.691562 2016] [mpm_prefork:notice] [pid 960] AH00169: caught SIGTERM, shutting down
[Mon Apr 11 19:20:31.839452 2016] [mpm_prefork:notice] [pid 958] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Mon Apr 11 19:20:31.840342 2016] [core:notice] [pid 958] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 11 19:40:18.221045 2016] [mpm_prefork:notice] [pid 958] AH00169: caught SIGTERM, shutting down
[Mon Apr 11 19:40:50.038563 2016] [mpm_prefork:notice] [pid 758] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Mon Apr 11 19:40:50.039610 2016] [core:notice] [pid 758] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 05 22:37:40.624317 2016] [mpm_prefork:notice] [pid 758] AH00169: caught SIGTERM, shutting down
[Thu May 05 22:38:48.501532 2016] [mpm_prefork:notice] [pid 1122] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 22:38:48.502594 2016] [core:notice] [pid 1122] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 05 22:53:37.509241 2016] [mpm_prefork:notice] [pid 1122] AH00169: caught SIGTERM, shutting down
[Thu May 05 22:55:27.727551 2016] [mpm_prefork:notice] [pid 1142] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 22:55:27.728604 2016] [core:notice] [pid 1142] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 05 23:18:25.527607 2016] [mpm_prefork:notice] [pid 1142] AH00169: caught SIGTERM, shutting down
[Thu May 05 23:21:18.682750 2016] [mpm_prefork:notice] [pid 1288] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 23:21:18.683853 2016] [core:notice] [pid 1288] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 05 23:45:59.809725 2016] [mpm_prefork:notice] [pid 1288] AH00169: caught SIGTERM, shutting down
[Thu May 05 23:47:20.475806 2016] [mpm_prefork:notice] [pid 1147] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 23:47:20.476917 2016] [core:notice] [pid 1147] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 05 23:47:49.662795 2016] [:error] [pid 1247] [client 192.168.6.100:55559] PHP Parse error: syntax error, unexpected '=' in /var/www/html/kalkun/index.php on line 13, referer: http://192.168.39.51/kalkun/index.php
[Thu May 05 23:47:49.663981 2016] [:error] [pid 1246] [client 192.168.6.100:55558] PHP Parse error: syntax error, unexpected '=' in /var/www/html/kalkun/index.php on line 13, referer: http://192.168.39.51/kalkun/index.php
[Thu May 05 23:48:48.576062 2016] [:error] [pid 1248] [client 192.168.6.100:55574] PHP Parse error: syntax error, unexpected '=' in /var/www/html/kalkun/index.php on line 13, referer: http://192.168.39.51/kalkun/index.php
[Thu May 05 23:48:52.961636 2016] [:error] [pid 1249] [client 192.168.6.100:55575] PHP Parse error: syntax error, unexpected '=' in /var/www/html/kalkun/index.php on line 13, referer: http://192.168.39.51/kalkun/index.php
[Thu May 05 23:48:53.700868 2016] [:error] [pid 1250] [client 192.168.6.100:55576] PHP Parse error: syntax error, unexpected '=' in /var/www/html/kalkun/index.php on line 13, referer: http://192.168.39.51/kalkun/index.php
[Thu May 05 23:48:54.676607 2016] [:error] [pid 1246] [client 192.168.6.100:55577] PHP Parse error: syntax error, unexpected '=' in /var/www/html/kalkun/index.php on line 13, referer: http://192.168.39.51/kalkun/index.php
[Thu May 05 23:51:51.737475 2016] [mpm_prefork:notice] [pid 1147] AH00169: caught SIGTERM, shutting down
[Thu May 05 23:51:52.682604 2016] [mpm_prefork:notice] [pid 1377] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 23:51:52.682842 2016] [core:notice] [pid 1377] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 06 00:02:03.886960 2016] [mpm_prefork:notice] [pid 1377] AH00169: caught SIGTERM, shutting down
[Tue May 10 09:17:45.004183 2016] [mpm_prefork:notice] [pid 1072] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Tue May 10 09:17:45.006454 2016] [core:notice] [pid 1072] AH00094: Command line: '/usr/sbin/apache2'
[Tue May 10 09:58:57.993459 2016] [mpm_prefork:notice] [pid 1072] AH00169: caught SIGTERM, shutting down
[Tue May 10 09:58:58.934240 2016] [mpm_prefork:notice] [pid 1537] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Tue May 10 09:58:58.934591 2016] [core:notice] [pid 1537] AH00094: Command line: '/usr/sbin/apache2'
[Tue May 10 10:01:13.353858 2016] [mpm_prefork:notice] [pid 1537] AH00169: caught SIGTERM, shutting down
[Tue May 10 10:01:35.292657 2016] [mpm_prefork:notice] [pid 990] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Tue May 10 10:01:35.294839 2016] [core:notice] [pid 990] AH00094: Command line: '/usr/sbin/apache2'
[Tue May 10 10:23:00.761408 2016] [mpm_prefork:notice] [pid 990] AH00169: caught SIGTERM, shutting down
[Tue May 10 10:23:26.330990 2016] [mpm_prefork:notice] [pid 995] AH00163: Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Tue May 10 10:23:26.331766 2016] [core:notice] [pid 995] AH00094: Command line: '/usr/sbin/apache2'

The server has also been rebooted.

Still no joy.

How did you set your server as i am not fussed with exchange.
I just need the emails to be send to a specific email address.

Did you use postfix, if yes can you paste your config here please?

Regards,

raj

@kingster
Copy link
Collaborator

Looks like something is wrong on index.php on line 13, can you paste the
line here?

I have used my hosting provider email and also gmail and both worked for me

Regards
Kinshuk Bairagi

hiya,

I have changed the following 2 line in the php.ini file :
display_errors = On
error_reporting = E_ALL

I made the modification to 2 php.ini files located in

/etc/php5/cli/php.ini
and
/etc/php5/apache2/php.ini

Then I looked at the logs in
/var/log/apache2/error.log

here is the output:

[Wed Mar 16 22:02:16.232503 2016] [mpm_prefork:notice] [pid 1003] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Wed Mar 16 22:02:16.232797 2016] [core:notice] [pid 1003] AH00094:
Command line: '/usr/sbin/apache2'
[Wed Mar 16 22:17:06.491580 2016] [mpm_prefork:notice] [pid 1003] AH00169:
caught SIGTERM, shutting down
[Wed Mar 16 22:17:31.521274 2016] [mpm_prefork:notice] [pid 949] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Wed Mar 16 22:17:31.522061 2016] [core:notice] [pid 949] AH00094: Command
line: '/usr/sbin/apache2'
[Thu Mar 17 04:02:48.336587 2016] [mpm_prefork:notice] [pid 949] AH00169:
caught SIGTERM, shutting down
[Thu Mar 17 04:02:49.343757 2016] [mpm_prefork:notice] [pid 3462] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 04:02:49.344115 2016] [core:notice] [pid 3462] AH00094:
Command line: '/usr/sbin/apache2'
[Thu Mar 17 04:23:08.661182 2016] [mpm_prefork:notice] [pid 1023] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 04:23:08.662030 2016] [core:notice] [pid 1023] AH00094:
Command line: '/usr/sbin/apache2'
[Thu Mar 17 14:06:25.470816 2016] [mpm_prefork:notice] [pid 1023] AH00169:
caught SIGTERM, shutting down
[Thu Mar 17 14:07:07.281197 2016] [mpm_prefork:notice] [pid 1052] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 14:07:07.282186 2016] [core:notice] [pid 1052] AH00094:
Command line: '/usr/sbin/apache2'
[Thu Mar 17 14:12:28.089427 2016] [mpm_prefork:notice] [pid 1052] AH00169:
caught SIGTERM, shutting down
[Thu Mar 17 14:13:00.064063 2016] [mpm_prefork:notice] [pid 1020] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 14:13:00.067012 2016] [core:notice] [pid 1020] AH00094:
Command line: '/usr/sbin/apache2'
[Thu Mar 17 14:27:56.735556 2016] [mpm_prefork:notice] [pid 1020] AH00169:
caught SIGTERM, shutting down
[Thu Mar 17 14:28:31.147074 2016] [mpm_prefork:notice] [pid 1017] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 14:28:31.148093 2016] [core:notice] [pid 1017] AH00094:
Command line: '/usr/sbin/apache2'
[Thu Mar 17 14:44:54.870132 2016] [mpm_prefork:notice] [pid 1017] AH00169:
caught SIGTERM, shutting down
[Thu Mar 17 15:24:35.613532 2016] [mpm_prefork:notice] [pid 1006] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 15:24:35.623712 2016] [core:notice] [pid 1006] AH00094:
Command line: '/usr/sbin/apache2'
[Thu Mar 17 21:40:08.280732 2016] [mpm_prefork:notice] [pid 1006] AH00169:
caught SIGTERM, shutting down
[Thu Mar 17 21:40:43.875650 2016] [mpm_prefork:notice] [pid 968] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu Mar 17 21:40:43.877984 2016] [core:notice] [pid 968] AH00094: Command
line: '/usr/sbin/apache2'
[Fri Mar 18 12:36:54.846532 2016] [mpm_prefork:notice] [pid 968] AH00169:
caught SIGTERM, shutting down
[Fri Mar 18 12:37:20.327136 2016] [mpm_prefork:notice] [pid 960] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Fri Mar 18 12:37:20.330797 2016] [core:notice] [pid 960] AH00094: Command
line: '/usr/sbin/apache2'
[Fri Mar 18 13:20:39.691562 2016] [mpm_prefork:notice] [pid 960] AH00169:
caught SIGTERM, shutting down
[Mon Apr 11 19:20:31.839452 2016] [mpm_prefork:notice] [pid 958] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Mon Apr 11 19:20:31.840342 2016] [core:notice] [pid 958] AH00094: Command
line: '/usr/sbin/apache2'
[Mon Apr 11 19:40:18.221045 2016] [mpm_prefork:notice] [pid 958] AH00169:
caught SIGTERM, shutting down
[Mon Apr 11 19:40:50.038563 2016] [mpm_prefork:notice] [pid 758] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Mon Apr 11 19:40:50.039610 2016] [core:notice] [pid 758] AH00094: Command
line: '/usr/sbin/apache2'
[Thu May 05 22:37:40.624317 2016] [mpm_prefork:notice] [pid 758] AH00169:
caught SIGTERM, shutting down
[Thu May 05 22:38:48.501532 2016] [mpm_prefork:notice] [pid 1122] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 22:38:48.502594 2016] [core:notice] [pid 1122] AH00094:
Command line: '/usr/sbin/apache2'
[Thu May 05 22:53:37.509241 2016] [mpm_prefork:notice] [pid 1122] AH00169:
caught SIGTERM, shutting down
[Thu May 05 22:55:27.727551 2016] [mpm_prefork:notice] [pid 1142] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 22:55:27.728604 2016] [core:notice] [pid 1142] AH00094:
Command line: '/usr/sbin/apache2'
[Thu May 05 23:18:25.527607 2016] [mpm_prefork:notice] [pid 1142] AH00169:
caught SIGTERM, shutting down
[Thu May 05 23:21:18.682750 2016] [mpm_prefork:notice] [pid 1288] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 23:21:18.683853 2016] [core:notice] [pid 1288] AH00094:
Command line: '/usr/sbin/apache2'
[Thu May 05 23:45:59.809725 2016] [mpm_prefork:notice] [pid 1288] AH00169:
caught SIGTERM, shutting down
[Thu May 05 23:47:20.475806 2016] [mpm_prefork:notice] [pid 1147] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 23:47:20.476917 2016] [core:notice] [pid 1147] AH00094:
Command line: '/usr/sbin/apache2'
[Thu May 05 23:47:49.662795 2016] [:error] [pid 1247] [client
192.168.6.100:55559] PHP Parse error: syntax error, unexpected '=' in
/var/www/html/kalkun/index.php on line 13, referer:
http://192.168.39.51/kalkun/index.php
[Thu May 05 23:47:49.663981 2016] [:error] [pid 1246] [client
192.168.6.100:55558] PHP Parse error: syntax error, unexpected '=' in
/var/www/html/kalkun/index.php on line 13, referer:
http://192.168.39.51/kalkun/index.php
[Thu May 05 23:48:48.576062 2016] [:error] [pid 1248] [client
192.168.6.100:55574] PHP Parse error: syntax error, unexpected '=' in
/var/www/html/kalkun/index.php on line 13, referer:
http://192.168.39.51/kalkun/index.php
[Thu May 05 23:48:52.961636 2016] [:error] [pid 1249] [client
192.168.6.100:55575] PHP Parse error: syntax error, unexpected '=' in
/var/www/html/kalkun/index.php on line 13, referer:
http://192.168.39.51/kalkun/index.php
[Thu May 05 23:48:53.700868 2016] [:error] [pid 1250] [client
192.168.6.100:55576] PHP Parse error: syntax error, unexpected '=' in
/var/www/html/kalkun/index.php on line 13, referer:
http://192.168.39.51/kalkun/index.php
[Thu May 05 23:48:54.676607 2016] [:error] [pid 1246] [client
192.168.6.100:55577] PHP Parse error: syntax error, unexpected '=' in
/var/www/html/kalkun/index.php on line 13, referer:
http://192.168.39.51/kalkun/index.php
[Thu May 05 23:51:51.737475 2016] [mpm_prefork:notice] [pid 1147] AH00169:
caught SIGTERM, shutting down
[Thu May 05 23:51:52.682604 2016] [mpm_prefork:notice] [pid 1377] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Thu May 05 23:51:52.682842 2016] [core:notice] [pid 1377] AH00094:
Command line: '/usr/sbin/apache2'
[Fri May 06 00:02:03.886960 2016] [mpm_prefork:notice] [pid 1377] AH00169:
caught SIGTERM, shutting down
[Tue May 10 09:17:45.004183 2016] [mpm_prefork:notice] [pid 1072] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Tue May 10 09:17:45.006454 2016] [core:notice] [pid 1072] AH00094:
Command line: '/usr/sbin/apache2'
[Tue May 10 09:58:57.993459 2016] [mpm_prefork:notice] [pid 1072] AH00169:
caught SIGTERM, shutting down
[Tue May 10 09:58:58.934240 2016] [mpm_prefork:notice] [pid 1537] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Tue May 10 09:58:58.934591 2016] [core:notice] [pid 1537] AH00094:
Command line: '/usr/sbin/apache2'
[Tue May 10 10:01:13.353858 2016] [mpm_prefork:notice] [pid 1537] AH00169:
caught SIGTERM, shutting down
[Tue May 10 10:01:35.292657 2016] [mpm_prefork:notice] [pid 990] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Tue May 10 10:01:35.294839 2016] [core:notice] [pid 990] AH00094: Command
line: '/usr/sbin/apache2'
[Tue May 10 10:23:00.761408 2016] [mpm_prefork:notice] [pid 990] AH00169:
caught SIGTERM, shutting down
[Tue May 10 10:23:26.330990 2016] [mpm_prefork:notice] [pid 995] AH00163:
Apache/2.4.12 (Ubuntu) configured -- resuming normal operations
[Tue May 10 10:23:26.331766 2016] [core:notice] [pid 995] AH00094: Command
line: '/usr/sbin/apache2'

The server has also been rebooted.

Still no joy.

How did you set your server as i am not fussed with exchange.
I just need the emails to be send to a specific email address.

Did you use postfix, if yes can you paste your config here please?

Regards,

raj


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#171 (comment)

@rajbps
Copy link
Author

rajbps commented May 12, 2016

I have tried the following:
Installed postfix and then mail util and send a mail and that worked.
So i created the file email.php as per :

#137

load->library('email'); $config['protocol'] = "smtp"; $config['smtp_host'] = "smtp.mailserver.net"; $config['smtp_port'] = "25"; $config['smtp_user'] = "kalkun@mailserver.net"; $config['smtp_pass'] = "Password"; $config['charset'] = 'utf-8'; $config['wordwrap'] = TRUE; $this->email->initialize($config); $this->email->from("kalkun@mailserver.net", 'Your Name'); $this->email->to('someone@example.com'); $this->email->subject('Email Test'); $this->email->message('Testing the email class.'); $this->email->send(); echo $this->email->print_debugger(); } ``` } Now the result was : A PHP Error was encountered Severity: Notice Message: Trying to get property of non-object Filename: libraries/Email.php Line Number: 112 A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: libraries/Email.php Line Number: 112 Your message has been successfully sent using the following protocol: mail User-Agent: CodeIgniter Date: Thu, 12 May 2016 17:11:08 +0100 From: "Your Name" Return-Path: Reply-To: "kalkun@mailserver.net" X-Sender: kalkun@mailserver.net X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: 5734ab1caab21@mailserver.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit =?utf-8?Q?Email_Test?= Testing the email class. The error on line 112 And as requested file the copy and paste of index.php

@rajbps
Copy link
Author

rajbps commented May 12, 2016

Forgor when I run the following the email is send :

load->library('email'); ``` $config['protocol'] = "smtp"; $config['smtp_host'] = "smtp.mailserver.net"; $config['smtp_port'] = "25"; $config['smtp_user'] = "kalkun@mailserver.net"; $config['smtp_pass'] = "Password"; $config['charset'] = 'utf-8'; $config['wordwrap'] = TRUE; $this->email->initialize($config); $this->email->from("kalkun@mailserver.net", 'Your Name'); $this->email->to('someone@example.com'); $this->email->subject('Email Test'); $this->email->message('Testing the email class.'); $this->email->send(); echo $this->email->print_debugger(); ``` } }

@kingster
Copy link
Collaborator

I have tried the following:
Installed postfix and then mail util and send a mail and that worked.
So i created the file email.php as per :

#137

<?php

class Email extends Controller {

function index()
{
    $this->load->library('email');

    $config['protocol'] = "smtp";
    $config['smtp_host'] = "smtp.mailserver.net";
    $config['smtp_port'] = "25";
    $config['smtp_user'] = "kalkun@mailserver.net";
    $config['smtp_pass'] = "Password";
    $config['charset'] = 'utf-8';
    $config['wordwrap'] = TRUE;

    $this->email->initialize($config);
    $this->email->from("kalkun@mailserver.net", 'Your Name');
    $this->email->to('someone@example.com'); 
    $this->email->subject('Email Test');
    $this->email->message('Testing the email class.');  
    $this->email->send();

    echo $this->email->print_debugger();
}
}

Now the result was :

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/Email.php

Line Number: 112
A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: libraries/Email.php

Line Number: 112
Your message has been successfully sent using the following protocol: mail

User-Agent: CodeIgniter
Date: Thu, 12 May 2016 17:11:08 +0100
From: "Your Name"
Return-Path:
Reply-To: "kalkun@mailserver.net"
X-Sender: kalkun@mailserver.net
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: 5734ab1caab21@mailserver.net
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
=?utf-8?Q?Email_Test?=
Testing the email class.

Can you clarify if you see the error or not?

@rajbps
Copy link
Author

rajbps commented May 12, 2016

well the email is sent but on that page you can see the following error:

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/Email.php

Line Number: 112
A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: libraries/Email.php

Line Number: 112

This is just went running th etest script.

When sending an sms it still does not go to the email and I cant see any logs.

If i unistall the sms to email plugin then all the sms that were supposed to be send via email floods in and I can see that in the inbox of kalkun

@kingster
Copy link
Collaborator

Line 112 of libraries/Email.php Refers to Codeigniter Internals

function initialize($config = array())
    {
        $this->clear();
        foreach ($config->config as $key => $val)

Seems like something is wrong with your installation / version

@rajbps
Copy link
Author

rajbps commented May 12, 2016

I install again on a new server i dont mind

@rajbps
Copy link
Author

rajbps commented May 23, 2016

Hiya,

I have installed on a new ubuntu installed and still the same issue :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants