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

Mail Service Provider for 0.3.0 #21

Closed
Soupala opened this issue May 4, 2014 · 9 comments
Closed

Mail Service Provider for 0.3.0 #21

Soupala opened this issue May 4, 2014 · 9 comments
Labels
core feature request Feature request
Milestone

Comments

@Soupala
Copy link

Soupala commented May 4, 2014

I'm trying to figure out how the email side of this project, and I imagine others will also be interested as well. I currently don't have any SMTP stuff installed my LAMP stack. I want to send the mail securely, and preferably piping through a 3rd party service like Mailgun or SendGrid. Mailgun provides 10,000 free emails/month, so I'm thinking of focusing on figuring out how to do that.

Any thoughts or tips. Is this a priority for anyone else? What are folks currently doing to get sendMail to work?

@mooseknuckle
Copy link

I have thought about this too. I host most of my websites on Amazon's EC2 platform, so I also use Amazon's Simple Email Sevice (SES) to send email rather than an SMTP connection. It is a very high priority for me to re-write the mail functions to use SES for my own purposes.

But maybe it would be a better idea to have something in the admin configuration page that allows users to select SMTP, SES, and a few other email services (like the ones that you listed) and then configure them on the page. I'm pretty new to PHP but I am going to play around with this and see if I can get it to work.

@lilfade
Copy link
Contributor

lilfade commented Jun 25, 2014

check this out

http://pear.php.net/package/Mail/

also found this on stack overflow may help out

// Pear Mail Library
require_once "Mail.php";

$from = '<from.gmail.com>';
$to = '<to.yahoo.com>';
$subject = 'Hi!';
$body = "Hi,\n\nHow are you?";

$headers = array(
    'From' => $from,
    'To' => $to,
    'Subject' => $subject
);

$smtp = Mail::factory('smtp', array(
        'host' => 'ssl://smtp.gmail.com',
        'port' => '465',
        'auth' => true,
        'username' => 'johndoe@gmail.com',
        'password' => 'passwordxxx'
    ));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
    echo('<p>' . $mail->getMessage() . '</p>');
} else {
    echo('<p>Message successfully sent!</p>');
}

@alexweissman
Copy link
Member

Cool. I should point out that a lot of email servers don't allow aliasing the from address. So, if you have it authenticate using your gmail account, it will show the email as coming from your gmail address.

@lilfade
Copy link
Contributor

lilfade commented Jun 25, 2014

Yea i just came across that stuff on the internet last night, for me that wouldn't be so bad I use the Google business thing to use drive Gmail ect on my domain but for others I'm sure they could change it to their servers and domains ect.

@alexweissman
Copy link
Member

Makes sense. Is there a way to implement this without PEAR? Some web hosts might not have PEAR installed.

@sotiris84
Copy link

You should consider swift-mailer (http://swiftmailer.org/). Its incredibly easy to set up and use. You just copy-paste the files in your hosting account and start sending emails. I use it for the contact form I have in my website. If you want I can help setting it up with some starter code...

@lilfade
Copy link
Contributor

lilfade commented Jul 16, 2014

You can make a commit on some code if you'd like and make a pull request.

alexweissman pushed a commit that referenced this issue Aug 28, 2014
@r3wt r3wt added question Further information is requested standards and best practices Coding guidelines long-range planning Long term roadmap 0.3.0 labels May 26, 2015
@r3wt r3wt changed the title 3rd party email services Mail Service Provider for 0.3.0 May 26, 2015
@alexweissman
Copy link
Member

We will be using PHPMailer in 0.3.0. However this still doesn't address the need for a third-party mailing service, maybe someone can write a plugin for this?

@alexweissman alexweissman added core feature request Feature request and removed long-range planning Long term roadmap question Further information is requested standards and best practices Coding guidelines 0.3.0 labels Aug 30, 2015
@alexweissman
Copy link
Member

Ok, I've made SMTP a configuration option in v0.3.1. So, you should now be able to configure UF to send emails through any SMTP server you have access to.

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

No branches or pull requests

6 participants