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

sms_to_email plugin - How to configure #137

Closed
gertfriend opened this issue Dec 19, 2013 · 12 comments
Closed

sms_to_email plugin - How to configure #137

gertfriend opened this issue Dec 19, 2013 · 12 comments

Comments

@gertfriend
Copy link

Sorry, i found no how to for this plugin.
I configured sms_to_email.php with the following Parameters:
$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;
$config['mail_from'] = 'kalkun@mailserver.net';
$config['mail_subject'] = 'Kalkun New SMS';
The mailaccount is OK, if i try to send mails from mailclients everything is fine.
Is there anything else to do?
Are there special prerequisites to send Mail?
Is smtp ok or must i use mail?
I use Debian Wheezy as OS.

@back2arie
Copy link
Collaborator

Hi
The config looks fine for me.

You can check on codeigniter user guide for complete documentation for configuring and debugging the email library

Sent from my iPhone

On 20 Des 2013, at 03:37, gertfriend notifications@github.com wrote:

Sorry, i found no how to for this plugin.
I configured sms_to_email.php with the following Parameters:
$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;
$config['mail_from'] = 'kalkun@mailserver.net';
$config['mail_subject'] = 'Kalkun New SMS';
The mailaccount is OK, if i try to send mails from mailclients everything is fine.
Is there anything else to do?
Are there special prerequisites to send Mail?
Is smtp ok or must i use mail?
I use Debian Wheezy as OS.


Reply to this email directly or view it on GitHub.

@kingster
Copy link
Collaborator

Check if your smtp is actually working, try sending test mail using codeigniter, the plugin uses codeigniter mail method to send mails

@gertfriend
Copy link
Author

Thank you for your fast Support.

I tried several things but i am not able to configure sms_to_mail at all.

@kingster
Copy link
Collaborator

kingster commented Jan 2, 2014

Please paste thee output of this

$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();

What will this test is whether your normal mail sending works or not, if you are able to send mail via this method, the mail plugin should be able to send mail too.

@gertfriend
Copy link
Author

I created a php file and paste this code into, then i tried to open it in a Webbrowser but it does nothing, there is no Output and i do not receive any mail?
Sorry for the question but is it right to put the code into a php-file and add at the beginn ?

@kingster
Copy link
Collaborator

kingster commented Jan 2, 2014

No, this needs to be inside a codeIgniter controller function code.

@gertfriend
Copy link
Author

I'm sorry but i don't know how it works but i won't steal your time. Thank you for your support till now.

@back2arie
Copy link
Collaborator

https://gist.github.com/back2arie/8254343/raw/db4c10c71be9e12288919a60d752a8169a84eaf8/email.php

Save it as application/controllers/email.php on your Kalkun path.
Then launch on browser as http://kalkun-url/index.php/email

See what happens

@gertfriend
Copy link
Author

Thank you. This is the result:

Your message has been successfully sent using the following protocol: mail
User-Agent: CodeIgniter
Date: Sat, 4 Jan 2014 16:20:36 +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: 52c826c42541a@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.

It was successfully but the protocol used is mail instead of smtp, is this OK?

@back2arie
Copy link
Collaborator

Looks like codeigniter-related issue, it's ok i guess, closed

@gertfriend
Copy link
Author

I hat to Change the protocol also in Kalkun/system/libraries/Email.php to work with smtp.

@gertfriend
Copy link
Author

Problem resoved, there must be added also some lines in kalkun/application/plugins/sms_to_email/sms_to_email.php:
In the config part: $config['mailtype'] = 'text'; as there are some Problems sending mail in php and
in the mailcreation part after inizialize: $CI->email->set_newline("\r\n");
After adding this who lines and changing the protocol in Kalkun/system/libraries/Email.php everything works fine. Thank you for your help.

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

No branches or pull requests

3 participants