Quick Email config File |
[eluser]taggedzi[/eluser]
I created a config file for email, based off the information found on the website. To save anyone the trouble hope it helps... Only took a few min... but I decided to share. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]Miguel Diaz[/eluser]
Hi Can you help me a little bit and tell me how it works? Greetings
[eluser]taggedzi[/eluser]
Sorry for the late reply, I never notice there was a question here. This is "a" config file to hold all of your email settings. Simply save it in your config folder Code: "/system/application/config/email.php" Then change the settings in the file to match your mail server configuration, then call the email class as ussual... The best summary I can point you to is CI's own page... http://ellislab.com/codeigniter/user-gui...email.html There are other ways to do this... and all the information in this file is on that page... i just typed it into a config file.
[eluser]FreshProgrammer[/eluser]
Hi.. I follow and set the setting as showed above.But,still i can not send email through this codeigniter. Below shows the error message that i had encountered. Severity: Warning Message: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() Filename: libraries/Email.php Line Number: 1519 If i am not mistaken,the space for smtp just leave it blank right? Does anyone know how to send the email correctly? Thank You
[eluser]jason.wolfsmith[/eluser]
If your server (in this case localhost) is not set up for sending mail yet then you will need to provide a SMTP. A lot of people just use google. Here is a link that should get you started. Using Google as SMTP Just add google's SMTP host and port to the CI email configuration file provided above and change protocol to 'smtp'. You will need a valid google email address and password for this to work.
[eluser]ninjayan[/eluser]
Thank you for sharing! I have tried sending email from gmail to yahoo and works fine. But when I send from yahoo to gmail, I received (sender email) a 'Mail Delivery Subsytem' Returned mail: see transcript for details The original message was received at Fri, 21 Jun 2013 14:52:03 +0800 from localhost [127.0.0.1] ----- The following addresses had permanent fatal errors ----- <[email protected]> (reason: 550-5.7.1 [122.52.102.190 1] Our system has detected an unusual rate of) ----- Transcript of session follows ----- ... while talking to gmail-smtp-in.l.google.com.: >>> DATA <<< 550-5.7.1 [122.52.102.190 1] Our system has detected an unusual rate of <<< 550-5.7.1 unsolicited mail originating from your IP address. To protect our <<< 550-5.7.1 users from spam, mail sent from your IP address has been blocked. <<< 550-5.7.1 Please visit http://www.google.com/mail/help/bulk_mail.html to review <<< 550 5.7.1 our Bulk Email Senders Guidelines. qq3si1446949oeb.47 - gsmtp 554 5.0.0 Service unavailable ..I tried also sending gmail to gmail didn't receive an email. . Here's the debugger result. Your message has been successfully sent using the following protocol: mail User-Agent: DTSv2 Date: Fri, 21 Jun 2013 15:42:32 +0800 From: "DTS" Return-Path: Reply-To: "[email protected]" X-Sender: [email protected] X-Mailer: DTSv2 X-Priority: 3 (Normal) Message-ID: <[email protected]> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit =?utf-8?Q?DTS_Notification?= Testing the email class.
|
Welcome Guest, Not a member yet? Register Sign In |