Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7717259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:50:33+00:00 2026-06-01T02:50:33+00:00

I am trying to send an attachment through AWS Simple Email Service, and i

  • 0

I am trying to send an attachment through AWS Simple Email Service, and i can get it to send a raw email WITHOUT ATTACHMENTS, however when i try it with attachments it always fails. Have i constructed my MIME message correctly?

Ok so here is the MIME that sends correctly:

From: test@example.com
To: test@example.com
Subject: Test Email
Content-Type: multipart/mixed;
  boundary="_003_97DCB304C5294779BEBCFC8357FCC4D2"
MIME-Version: 1.0

--_003_97DCB304C5294779BEBCFC8357FCC4D2
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello, This is a test email.

When I attach the attachment is fails to send:

From: test@example.com
To: test@example.com
Subject: Test Email
Content-Type: multipart/mixed;
  boundary="_003_97DCB304C5294779BEBCFC8357FCC4D2"
MIME-Version: 1.0

--_003_97DCB304C5294779BEBCFC8357FCC4D2
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello, This is a test email.

--_003_97DCB304C5294779BEBCFC8357FCC4D2
Content-Type: text/txt; name="test.txt"
Content-Description: test.txt
Content-Disposition: attachment; filename="test.txt";
Content-Transfer-Encoding: base64

VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudC4=

--_003_97DCB304C5294779BEBCFC8357FCC4D2

Is there anything obviously wrong?

I contruct the call by base64 encoding the whole message and adding it to the end of this URL:

Action=SendRawEmail&Destinations.member.1=test%40example.com&RawMessage.Data={base64 encoded MIME Message}

ANSWER:

There were two issues with the MIME file. First

  • The trailing boundery shouldnt be there, as it is obviously looking for another aspect of the MIME message, eg another attachment.

  • The Content-Type which is defined as “text/txt” should actually be “text/plain”

Thus meaning with those two alterations you get this MIME message which works:

From: test@example.com
To: test@example.com
Subject: Test Email
Content-Type: multipart/mixed;
  boundary="_003_97DCB304C5294779BEBCFC8357FCC4D2"
MIME-Version: 1.0

--_003_97DCB304C5294779BEBCFC8357FCC4D2
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello, This is a test email.

--_003_97DCB304C5294779BEBCFC8357FCC4D2
Content-Type: text/plain; name="test.txt"
Content-Description: test.txt
Content-Disposition: attachment; filename="test.txt";
Content-Transfer-Encoding: base64

VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudC4=
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:50:35+00:00Added an answer on June 1, 2026 at 2:50 am

    There were two issues with the MIME file. First

    • The trailing boundery shouldnt be there, as it is obviously looking for another aspect of the MIME message, eg another attachment.

    • The Content-Type which is defined as “text/txt” should actually be “text/plain”

    Thus meaning with those two alterations you get this MIME message which works:

    From: test@example.com
    To: test@example.com
    Subject: Test Email
    Content-Type: multipart/mixed;
      boundary="_003_97DCB304C5294779BEBCFC8357FCC4D2"
    MIME-Version: 1.0
    
    --_003_97DCB304C5294779BEBCFC8357FCC4D2
    Content-Type: text/plain; charset="us-ascii"
    Content-Transfer-Encoding: quoted-printable
    
    Hello, This is a test email.
    
    --_003_97DCB304C5294779BEBCFC8357FCC4D2
    Content-Type: text/plain; name="test.txt"
    Content-Description: test.txt
    Content-Disposition: attachment; filename="test.txt";
    Content-Transfer-Encoding: base64
    
    VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudC4=
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to send an encrypted email with an attachment from PHP, however, my
I'm trying to send an email with an attachment using CakePHP 2.0. The file
I have been struggling with trying to send an email with an attachment using
im trying to build a form+attachment that needs to be send to email. Im
I am trying to send an email containing a file attachment created by the
I'm trying to make an EXTJS application to send email with an attachment. So
Having big problems trying to get my php script to send email. Using this
I am trying to send an email via PHP mail() with attachments. The attachments
I'm trying to send an email with an HTML attachment, I don't want the
I am trying to send email through gmail using PHPMailer_V5.1. Getting the following error,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.