Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Base64 encoding for AWS #2

Closed
egrieco opened this issue Jul 4, 2022 · 5 comments
Closed

Invalid Base64 encoding for AWS #2

egrieco opened this issue Jul 4, 2022 · 5 comments

Comments

@egrieco
Copy link

egrieco commented Jul 4, 2022

I'm testing pigeon with AWS and I keep receiving the following error:

  <Error>
    <Type>Sender</Type>
    <Code>MalformedInput</Code>
    <Message>Invalid Base64 encoding</Message>
  </Error>

Here is the command that I am running (actual email addresses hidden for privacy):

pigeon send --connection aws --verbose --display [email protected] [email protected] --message-file message.yaml

And here is the debug output:

Reading message file 'message.yaml' ...
Display message file: MessageTemplate {
    subject: "Pigeon Test",
    text: Some(
        "Testing pigeon for sending email.",
    ),
    html: Some(
        "Testing pigeon for sending email.",
    ),
}
Display email: Email {
    sender: "[email protected]",
    receiver: "[email protected]",
    message: Message {
        subject: "Pigeon Test",
        text: Some(
            "Testing pigeon for sending email.",
        ),
        html: Some(
            "Testing pigeon for sending email.",
        ),
    },
    mime_format: From: [email protected]
    To: [email protected]
    Subject: Pigeon Test
    MIME-Version: 1.0
    Date: Mon, 04 Jul 2022 18:21:37 +0000
    Content-Type: multipart/alternative;
     boundary="QtdoKChvSXDqIPYoKulOOZ8UFmHlV30mqzhHqI1G"

    --QtdoKChvSXDqIPYoKulOOZ8UFmHlV30mqzhHqI1G
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 7bit

    Testing pigeon for sending email.
    --QtdoKChvSXDqIPYoKulOOZ8UFmHlV30mqzhHqI1G
    Content-Type: text/html; charset=utf-8
    Content-Transfer-Encoding: 7bit

    Testing pigeon for sending email.
    --QtdoKChvSXDqIPYoKulOOZ8UFmHlV30mqzhHqI1G--
    ,
}

It seems that the message is not being encoded as Base64.

I'll take another look at the source and see if I can further isolate or fix the error, time permitting.

@quambene
Copy link
Owner

quambene commented Jul 8, 2022

Thanks for your bug report. Bug reproduced, having a look.

@egrieco
Copy link
Author

egrieco commented Jul 8, 2022

I think I fixed it, but I'm having trouble with confirming that due to Amazon SES weirdness/BS.

Shall I put together a pull request anyway?

@quambene
Copy link
Owner

quambene commented Jul 8, 2022

Thanks, I just pushed a fix to master and preparing a release for crates.io.

@egrieco
Copy link
Author

egrieco commented Jul 8, 2022

Yep, just looked at commit ca9fbbc and I did the same thing. Seemed to fix the issue. 😄

@quambene
Copy link
Owner

quambene commented Jul 8, 2022

Fixed in v0.3.0.

@quambene quambene closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants