[Haskell-cafe] Sending email

David Escobar davidescobar at ieee.org
Thu Apr 28 07:31:43 UTC 2016


I think I found what the problem was. I was using an Amazon SES account and
even though the email got sent successfully, the HTML and CSS got messed
up. When I used a regular Gmail account, the email came through with the
HTML and CSS as intended. So it must be something different in the way SES
expects this to be sent (what threw me off was that the email still got
sent). I guess that's the reason the *Network.Mail.Mime.SES* package
exists, so I'll switch over to using that one for the SES account and try
and get that working. Thanks.

On Wed, Apr 27, 2016 at 1:32 AM, Daniel P. Wright <dani at dpwright.com> wrote:

> Hi David,
>
> Off the top of my head I'm not sure what the root cause of that would be,
> or indeed if the problem lies with HaskellNet-SSL or with HaskellNet
> itself.  If you can send me some sample code (either by email or by filing
> an issue at https://github.com/dpwright/HaskellNet-SSL/issues) I can take
> a look at it.
>
> -Dani.
>
> 2016-04-27 16:14 GMT+09:00 David Escobar <davidescobar at ieee.org>:
>
>> Hi Daniel,
>> I have another issue when using HaskellNet. It seems the way the library
>> sends email is causing extra spaces and line breaks to be inserted in my
>> HTML emails, which completely messes up the inline CSS styles. When I
>> turned *sslLogToConsole = True*, this is the kind of output I get in the
>> log:
>>
>> *HaskellNet-SSL SEND: "<!DOCTYPE html>\r"*
>> *HaskellNet-SSL SEND: "\r\n"*
>> *HaskellNet-SSL SEND: "<html><body><table style=3D\"border: 1px solid
>> black; border-collapse: colla=\r"*
>> *HaskellNet-SSL SEND: "\r\n"*
>> *HaskellNet-SSL SEND: "pse; margin: 25px 0; width: 100%;\"><tr><th
>> style=3D\"background-color: #072a=\r"*
>> *HaskellNet-SSL SEND: "\r\n"*
>> *HaskellNet-SSL SEND: "2d; color: white; font-weight: bold; border-right:
>> 1px solid white; padding=\r"*
>> *HaskellNet-SSL SEND: "\r\n"*
>> *HaskellNet-SSL SEND: ": 5px 10px; width: 33%;\">Committer</th>\r"*
>> *HaskellNet-SSL SEND: "\r\n"*
>> *HaskellNet-SSL SEND: "<th style=3D\"background-color: #072a2d; color:
>> white; font-weight: bold; bo=\r"*
>> *HaskellNet-SSL SEND: "\r\n"*
>> *HaskellNet-SSL SEND: "rder-right: 1px solid white; padding: 5px 10px;
>> width: 33%;\">SHA1</th>\r"*
>> *HaskellNet-SSL SEND: "\r\n"*
>> *HaskellNet-SSL SEND: "<th style=3D\"background-color: #072a2d; color:
>> white; font-weight: bold; bo=\r"*
>> *HaskellNet-SSL SEND: "\r\n"*
>>
>> As you can see, extra line breaks are being inserted right in the middle
>> of the HTML/CSS, which completely messes it up. Is there a way to prevent
>> that? The only option I could find was *Settings* *sslMaxLineLength*,
>> but setting that to a high number doesn't solve the problem.
>>
>> Thanks,
>> David
>>
>> On Wed, Apr 20, 2016 at 12:00 AM, Daniel P. Wright <dani at dpwright.com>
>> wrote:
>>
>>> Bardur,
>>>
>>> Ah, ok, that makes sense.  Thanks for the clarification.
>>>
>>> -Dani.
>>>
>>> 2016-04-20 15:56 GMT+09:00 Bardur Arantsson <spam at scientician.net>:
>>>
>>>> On 04/20/2016 08:32 AM, Daniel P. Wright wrote:
>>>> > Hello David,
>>>> >
>>>> >> The only thing I noticed with Gmail is that in order to work it
>>>> requires
>>>> > the sender's account to toggle this setting:
>>>> >> Allow less secure apps: OFF
>>>> >
>>>> > That does sound unusual!  Is my understanding you correctly that
>>>> HaskellNet
>>>> > doesn't work UNLESS you disallow less secure apps?  Or is it the other
>>>> > (more intuitive) way round? (i.e. HaskellNet is being considered a
>>>> "less
>>>> > secure" app and thus being disallowed).
>>>>
>>>> It's not particularly sinister...
>>>>
>>>> It's is simply that IMAP/SMTP do not have authentication options that
>>>> are "secure enough" for Google[1]. Or perhaps rather that they at least
>>>> must allow less secure authentication options per their respective
>>>> standards/RFCs.
>>>>
>>>> Regards,
>>>>
>>>> [1] Basically they don't enforce two-factor auth.
>>>>
>>>>
>>>> _______________________________________________
>>>> Haskell-Cafe mailing list
>>>> Haskell-Cafe at haskell.org
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>>>
>>>
>>>
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160428/0ebf0a2a/attachment.html>


More information about the Haskell-Cafe mailing list