Re: [racket-users] Setting return address in Racket's sendmail

2016-03-19 Thread Marc Kaufmann
Thanks, the smtp works, and it seems that sendmail actually does work even
the way I used it, but the email I used landed in spam, because google
realized it hadn't been sent from that account (since I was bypassing it,
unlike the smtp solution, which logs into the account first).

Matthew, regarding your point, the #f actually gets replaced by sendmail by
the email address associated with the account (which needs to be set), so
that wasn't the issue.

Best,
Marc

On Wed, Mar 16, 2016 at 10:29 PM, Matthias Felleisen 
wrote:

>
> This has gotten me rejection replies:
>
>   (smtp-send-message
>(dns-get-address (dns-find-nameserver) "smtp.gmail.com")
>"matth...@ccs.neu.edu"
>actual-send-to-addresses
>addresses-put-into-header
>file
>#:port-no 465
>; for gmail don't include the @gmail.com
>#:auth-user “foobarf@"
>#:auth-passwd “XYZ"
>#:tcp-connect ssl-connect))
>
>
>
> On Mar 16, 2016, at 8:35 PM, Marc Kaufmann 
> wrote:
>
> Hi all,
>
> I am using send-mail-message as follows:
>
> #lang racket
>
> (require net/sendmail)
> (send-mail-message
>  #f "Test sendmail"
>  '("fake-em...@marcs-server.com")
>  '()
>  '()
>  '("Testing Racket sendmail."))
>
> It works as expected when I send something to myself, since sendmail goes
> and gets the email associated with my user. But when I send it to a
> non-existing email, I do not get a notification that it wasn't delivered.
>
> Is there a way to set the return address? I presume it goes into the
> extra-header argument, but I am not sure.
>
> Thanks,
> Marc
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Setting return address in Racket's sendmail

2016-03-19 Thread George Neuner

On 3/16/2016 10:29 PM, Matthias Felleisen wrote:


This has gotten me rejection replies:

  (smtp-send-message
   (dns-get-address (dns-find-nameserver) "smtp.gmail.com 
")

   "matth...@ccs.neu.edu "
   actual-send-to-addresses
   addresses-put-into-header
   file
   #:port-no 465
   ; for gmail don't include the @gmail.com 
   #:auth-user “foobarf@"
   #:auth-passwd “XYZ"
   #:tcp-connect ssl-connect))



Gmail is a PITA.  It drove me crazy last year testing email code for my 
web application - the deployment system had a local SMTP service to use, 
but my development system didn't.



Gmail is very critical of the message format - it has to be (more or 
less) 100% correct.  If there are any errors in the message string you 
are very likely to get rejected.


No matter what "from" address you specify, the address that appears in 
the received email will that of the Gmail user.  The specified address 
appears in an extra header - "X-Google-Original-From" - but the receiver 
will never see that unless they look for it.   I have not tried using a 
"reply-to" header with Gmail.


Also, AFAIK, Gmail's SMTP server does require the domain of the 
authorized user: e.g., "foob...@gmail.com".  I was not able to make it 
work otherwise.  I think this is because there are both @gmail.com and 
@google.com addresses that it recognizes.


George

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Setting return address in Racket's sendmail

2016-03-19 Thread Matthias Felleisen

This has gotten me rejection replies: 

  (smtp-send-message
   (dns-get-address (dns-find-nameserver) "smtp.gmail.com") 
   "matth...@ccs.neu.edu" 
   actual-send-to-addresses
   addresses-put-into-header
   file 
   #:port-no 465
   ; for gmail don't include the @gmail.com
   #:auth-user “foobarf@" 
   #:auth-passwd “XYZ"
   #:tcp-connect ssl-connect))



> On Mar 16, 2016, at 8:35 PM, Marc Kaufmann  wrote:
> 
> Hi all,
> 
> I am using send-mail-message as follows:
> 
> #lang racket
> 
> (require net/sendmail)
> (send-mail-message
>  #f "Test sendmail"
>  '("fake-em...@marcs-server.com ")
>  '()
>  '()
>  '("Testing Racket sendmail."))
> 
> It works as expected when I send something to myself, since sendmail goes and 
> gets the email associated with my user. But when I send it to a non-existing 
> email, I do not get a notification that it wasn't delivered.
> 
> Is there a way to set the return address? I presume it goes into the 
> extra-header argument, but I am not sure.
> 
> Thanks,
> Marc
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.