using GMail to send e-mail causing email

Discussion in 'Ruby' started by Brian Rhiel, May 31, 2010.

  1. Brian Rhiel

    Brian Rhiel Guest

    Hi,

    I am attempting to setup my development environment to use gmail to send
    e-mails.

    I have the following in development.rb

    config.action_mailer.raise_delivery_errors = true
    config.action_mailer.perform_deliveries = true
    config.action_mailer.delivery_method = :smtp
    config.action_mailer.default_content_type = 'text/plain'
    config.action_mailer.smtp_settings = {
    :enable_starttls_auto => true,
    :address => 'smpt.gmail.com',
    :port => 587,
    :authentication => :plain,
    :domain => 'myapp.com',
    :user_name => '',
    :password => 'xxxxxx'
    }


    The Logs are displaying:

    Sent mail to

    Date: Mon, 31 May 2010 13:37:49 -0500
    From:
    To:
    Subject: Test
    Mime-Version: 1.0
    Content-Type: multipart/alternative;
    boundary=mimepart_4c0401fdd548_c912d0e7101c8


    --mimepart_4c0401fdd548_c912d0e7101c8
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: Quoted-printable
    Content-Disposition: inline

    Hello,

    You are receiving this e-mail via Gmail.=

    --mimepart_4c0401fdd548_c912d0e7101c8--

    SocketError (getaddrinfo: nodename nor servname provided, or not known):
    /usr/local/lib/ruby/1.8/net/smtp.rb:551:in `initialize'
    /usr/local/lib/ruby/1.8/net/smtp.rb:551:in `open'
    /usr/local/lib/ruby/1.8/net/smtp.rb:551:in `do_start'
    /usr/local/lib/ruby/1.8/timeout.rb:62:in `timeout'
    /usr/local/lib/ruby/1.8/timeout.rb:93:in `timeout'
    /usr/local/lib/ruby/1.8/net/smtp.rb:551:in `do_start'
    /usr/local/lib/ruby/1.8/net/smtp.rb:525:in `start'
    app/controllers/listings_controller.rb:204:in `contact_client'

    Rendered rescues/_trace (133.2ms)
    Rendered rescues/_request_and_response (3.1ms)
    Rendering rescues/layout (internal_server_error)


    I am on a Mac with Leopard
    I am using Rails version: 2.3.5
    I am using Ruby version: 1.8.7

    Does anybody know why I cannot send e-mails?
    --
    Posted via http://www.ruby-forum.com/.
     
    Brian Rhiel, May 31, 2010
    #1
    1. Advertising

  2. On Mon, May 31, 2010 at 11:47 AM, Brian Rhiel <> wrote:

    > I am attempting to setup my development environment to use gmail...


    > I have the following in development.rb


    > config.action_mailer.smtp_settings =3D {
    > =A0:address =3D> 'smpt.gmail.com',
    > }


    > The Logs are displaying:


    > SocketError (getaddrinfo: nodename nor servname provided, or not known):


    > Does anybody know why I cannot send e-mails?


    Because as the error message (somewhat obliquely) says, there is
    no such host as 'smpt.gmail.com'.

    There is, however, a 'smtp.gmail.com' . :)

    HTH,
    --=20
    Hassan Schroeder ------------------------
    twitter: @hassan
     
    Hassan Schroeder, May 31, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    15
    Views:
    155,956
    abhishek-technicalwork
    Jul 11, 2012
  2. fredd00

    send mail with gmail

    fredd00, Feb 18, 2008, in forum: ASP .Net
    Replies:
    5
    Views:
    16,268
  3. Gabriel Genellina

    Re: smtplib send email by using gmail smtp server

    Gabriel Genellina, May 3, 2009, in forum: Python
    Replies:
    0
    Views:
    451
    Gabriel Genellina
    May 3, 2009
  4. Junkone

    send email using gmail as smtp

    Junkone, Dec 20, 2007, in forum: Ruby
    Replies:
    3
    Views:
    287
    Junkone
    Dec 20, 2007
  5. ashish makani
    Replies:
    5
    Views:
    607
    Mark Lawrence
    Sep 20, 2012
Loading...

Share This Page