title: R: sending email with sendmailR - "invalid host argument" error
body: <p>I've downloaded the sendmailR package, but I'm having trouble sending an email. I've seen that there are several other posts on this, but I haven't been able to correct the problem.</p>
  
  <p>My code looks as follows:  </p>
  
  <blockquote>
    <p>smtp = list(host.name = "smtp.gmail.com", port = 465, user.name =
    "xxx@gmail.com", 
                  passwd = "yyy", ssl = TRUE)</p>
    
    <p>mailControl=list(smtpServer=smtp)</p>
    
    <p>sendmail(from = sender, to = receiver, subject = title, msg =
    bodyWithAttachment, control = mailControl)</p>
  </blockquote>
  
  <p>I keep getting the error:  </p>
  
  <pre><code>Error in socketConnection(host = server, port = port, blocking = TRUE) : 
    invalid 'host' argument
  </code></pre>
  
  <p>I don't know if I'm using the correct port, or how to check (I've tried several that I've found online). Also, the host name is the one I found in a post about gmail accounts. Not sure if there is some way I can check if the security on my own computer is blocking it somehow?</p>
  
  <p>Any help would be great!</p>
  
  <p>Thanks</p>
  
  <p>Mike</p>