You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by "John D. Ament" <jo...@apache.org> on 2017/06/09 11:13:12 UTC

Anything special to make SMTP work?

I'm struggling with email a bit

I've added the following to my ~/.whimsy, but still can't get mail to
send.  Password is correct.

:sendmail:
  delivery_method: smtp
  address: smtp.gmail.com
  port: 587
  domain: apache.org
  user_name: john.d.ament@gmail.com
  password: ***
  authentication: plain
  enable_starttls_auto: true

Date: Fri, 09 Jun 2017 07:08:43 -0400
From: johnament@apache.org
To:  <>
Message-ID: <59...@Johns-MBP-2.home.mail>
Subject: test mail
Mime-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

sent from Johns-MBP-2.home

/Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:981:in
`check_auth_response': 535-5.7.8 Username and Password not accepted. Learn
more at (Net::SMTPAuthenticationError)
from
/Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:736:in
`auth_plain'
from
/Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:728:in
`authenticate'
from
/Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:565:in
`do_start'
from
/Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:518:in
`start'
from
/Users/johnament/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5/lib/mail/network/delivery_methods/smtp.rb:113:in
`deliver!'
from
/Users/johnament/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5/lib/mail/message.rb:253:in
`deliver!'
from whimsy/tools/testmail.rb:28:in `<main>'

Re: Anything special to make SMTP work?

Posted by sebb <se...@gmail.com>.
On 10 June 2017 at 02:17, John D. Ament <jo...@apache.org> wrote:
>  Otherwise we
> have to figure out how to get ponymail to setup an SMTP listener.

If you just want to test that emails are sent correctly, Python has a
simple SMTP server:

python -m smtpd -n -c DebuggingServer localhost:1025

This will print out the content of any mails sent to it.

Maybe Ruby has something similar.

Re: Anything special to make SMTP work?

Posted by "John D. Ament" <jo...@apache.org>.
On Fri, Jun 9, 2017 at 9:16 PM Sam Ruby <ru...@intertwingly.net> wrote:

> On Fri, Jun 9, 2017 at 8:37 PM, John D. Ament <jo...@apache.org>
> wrote:
> > On Fri, Jun 9, 2017 at 9:49 AM Sam Ruby <ru...@intertwingly.net> wrote:
> >
> >> On Fri, Jun 9, 2017 at 7:13 AM, John D. Ament <jo...@apache.org>
> >> wrote:
> >> > I'm struggling with email a bit
> >> >
> >> > I've added the following to my ~/.whimsy, but still can't get mail to
> >> > send.  Password is correct.
> >>
> >> It looks like you added @gmail.com to your user_name.  Here's what
> works
> >> for me:
> >>
> >>
> > I've tried with and without @gmail.com.  Neither works.
> >
> > I do have MFA enabled though, does your account?
>
> I do not have MFA enabled.
>
> I can also send mail through my ISP, though I've found that such
> emails are throttled:
>
> :sendmail:
>   delivery_method: smtp
>   address: smtp-server.nc.rr.com
>   domain:  intertwingly.net
>
> - Sam Ruby
>


I got it working with an older gmail account.  My company also has an
opensource smtp server for simple use cases, may try that.  Otherwise we
have to figure out how to get ponymail to setup an SMTP listener.

Re: Anything special to make SMTP work?

Posted by Sam Ruby <ru...@intertwingly.net>.
On Fri, Jun 9, 2017 at 8:37 PM, John D. Ament <jo...@apache.org> wrote:
> On Fri, Jun 9, 2017 at 9:49 AM Sam Ruby <ru...@intertwingly.net> wrote:
>
>> On Fri, Jun 9, 2017 at 7:13 AM, John D. Ament <jo...@apache.org>
>> wrote:
>> > I'm struggling with email a bit
>> >
>> > I've added the following to my ~/.whimsy, but still can't get mail to
>> > send.  Password is correct.
>>
>> It looks like you added @gmail.com to your user_name.  Here's what works
>> for me:
>>
>>
> I've tried with and without @gmail.com.  Neither works.
>
> I do have MFA enabled though, does your account?

I do not have MFA enabled.

I can also send mail through my ISP, though I've found that such
emails are throttled:

:sendmail:
  delivery_method: smtp
  address: smtp-server.nc.rr.com
  domain:  intertwingly.net

- Sam Ruby

Re: Anything special to make SMTP work?

Posted by Shane Curcuru <as...@shanecurcuru.org>.
John D. Ament wrote on 6/9/17 8:37 PM:
> On Fri, Jun 9, 2017 at 9:49 AM Sam Ruby <ru...@intertwingly.net> wrote:
> 
>> On Fri, Jun 9, 2017 at 7:13 AM, John D. Ament <jo...@apache.org>
>> wrote:
>>> I'm struggling with email a bit
>>>
>>> I've added the following to my ~/.whimsy, but still can't get mail to
>>> send.  Password is correct.
>>
>> It looks like you added @gmail.com to your user_name.  Here's what works
>> for me:
>>
>>
> I've tried with and without @gmail.com.  Neither works.
> 
> I do have MFA enabled though, does your account?

Doesn't 2FA mean you need to use an app-specific password?

https://support.google.com/mail/answer/185833?hl=en

Let me know if it works - although I still hate sticking a Google ID
password in plaintext.

(Not that my whimsy.local SVN works yet anyway... need to find time to
experiment with rebuilding the keychain)

- Shane

> 
> 
>>   user_name: sa3ruby
>>
>> - Sam Ruby
>>
>>> :sendmail:
>>>   delivery_method: smtp
>>>   address: smtp.gmail.com
>>>   port: 587
>>>   domain: apache.org
>>>   user_name: john.d.ament@gmail.com
>>>   password: ***
>>>   authentication: plain
>>>   enable_starttls_auto: true
>>>
>>> Date: Fri, 09 Jun 2017 07:08:43 -0400
>>> From: johnament@apache.org
>>> To:  <>
>>> Message-ID: <59...@Johns-MBP-2.home.mail>
>>> Subject: test mail
>>> Mime-Version: 1.0
>>> Content-Type: text/plain;
>>>  charset=UTF-8
>>> Content-Transfer-Encoding: 7bit
>>>
>>> sent from Johns-MBP-2.home
>>>
>>> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:981:in
>>> `check_auth_response': 535-5.7.8 Username and Password not accepted.
>> Learn
>>> more at (Net::SMTPAuthenticationError)
>>> from
>>> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:736:in
>>> `auth_plain'
>>> from
>>> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:728:in
>>> `authenticate'
>>> from
>>> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:565:in
>>> `do_start'
>>> from
>>> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:518:in
>>> `start'
>>> from
>>>
>> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5/lib/mail/network/delivery_methods/smtp.rb:113:in
>>> `deliver!'
>>> from
>>>
>> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5/lib/mail/message.rb:253:in
>>> `deliver!'
>>> from whimsy/tools/testmail.rb:28:in `<main>'
>>
> 


-- 

- Shane
  https://www.apache.org/foundation/marks/resources

Re: Anything special to make SMTP work?

Posted by "John D. Ament" <jo...@apache.org>.
On Fri, Jun 9, 2017 at 9:49 AM Sam Ruby <ru...@intertwingly.net> wrote:

> On Fri, Jun 9, 2017 at 7:13 AM, John D. Ament <jo...@apache.org>
> wrote:
> > I'm struggling with email a bit
> >
> > I've added the following to my ~/.whimsy, but still can't get mail to
> > send.  Password is correct.
>
> It looks like you added @gmail.com to your user_name.  Here's what works
> for me:
>
>
I've tried with and without @gmail.com.  Neither works.

I do have MFA enabled though, does your account?


>   user_name: sa3ruby
>
> - Sam Ruby
>
> > :sendmail:
> >   delivery_method: smtp
> >   address: smtp.gmail.com
> >   port: 587
> >   domain: apache.org
> >   user_name: john.d.ament@gmail.com
> >   password: ***
> >   authentication: plain
> >   enable_starttls_auto: true
> >
> > Date: Fri, 09 Jun 2017 07:08:43 -0400
> > From: johnament@apache.org
> > To:  <>
> > Message-ID: <59...@Johns-MBP-2.home.mail>
> > Subject: test mail
> > Mime-Version: 1.0
> > Content-Type: text/plain;
> >  charset=UTF-8
> > Content-Transfer-Encoding: 7bit
> >
> > sent from Johns-MBP-2.home
> >
> > /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:981:in
> > `check_auth_response': 535-5.7.8 Username and Password not accepted.
> Learn
> > more at (Net::SMTPAuthenticationError)
> > from
> > /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:736:in
> > `auth_plain'
> > from
> > /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:728:in
> > `authenticate'
> > from
> > /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:565:in
> > `do_start'
> > from
> > /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:518:in
> > `start'
> > from
> >
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5/lib/mail/network/delivery_methods/smtp.rb:113:in
> > `deliver!'
> > from
> >
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5/lib/mail/message.rb:253:in
> > `deliver!'
> > from whimsy/tools/testmail.rb:28:in `<main>'
>

Re: Anything special to make SMTP work?

Posted by Sam Ruby <ru...@intertwingly.net>.
On Fri, Jun 9, 2017 at 7:13 AM, John D. Ament <jo...@apache.org> wrote:
> I'm struggling with email a bit
>
> I've added the following to my ~/.whimsy, but still can't get mail to
> send.  Password is correct.

It looks like you added @gmail.com to your user_name.  Here's what works for me:

  user_name: sa3ruby

- Sam Ruby

> :sendmail:
>   delivery_method: smtp
>   address: smtp.gmail.com
>   port: 587
>   domain: apache.org
>   user_name: john.d.ament@gmail.com
>   password: ***
>   authentication: plain
>   enable_starttls_auto: true
>
> Date: Fri, 09 Jun 2017 07:08:43 -0400
> From: johnament@apache.org
> To:  <>
> Message-ID: <59...@Johns-MBP-2.home.mail>
> Subject: test mail
> Mime-Version: 1.0
> Content-Type: text/plain;
>  charset=UTF-8
> Content-Transfer-Encoding: 7bit
>
> sent from Johns-MBP-2.home
>
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:981:in
> `check_auth_response': 535-5.7.8 Username and Password not accepted. Learn
> more at (Net::SMTPAuthenticationError)
> from
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:736:in
> `auth_plain'
> from
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:728:in
> `authenticate'
> from
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:565:in
> `do_start'
> from
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/smtp.rb:518:in
> `start'
> from
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5/lib/mail/network/delivery_methods/smtp.rb:113:in
> `deliver!'
> from
> /Users/johnament/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5/lib/mail/message.rb:253:in
> `deliver!'
> from whimsy/tools/testmail.rb:28:in `<main>'