3

I have started to use Amazon SES service for sending all my project e-mails. Currently I have converted all my code to use it. But still lacking on examples for implementing e-mails with attachment as MIME types and HEADERS are not my strong side.

Could someone share some wisdom on how exactly I can get SendRawEmail to work? What 3rd-party libraries I should be using to create legit e-mail with attachments?

I use latest aws-ses-sdk for php.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
arma
  • 4,084
  • 10
  • 48
  • 63
  • 1
    I think the part about "spam" can not be specifically answered, but how to create a "raw" email can (spam scroring is more dependent on the actual message content then how you create the actual mail message technically). – hakre Oct 07 '11 at 00:25
  • @hakre Oh i see, so what im looking for is how to properly setup raw e-mail with proper headers and mime types. – arma Oct 07 '11 at 04:33
  • 1
    Checkout http://swiftmailer.org/, you might implement a custom transport for aws-ses or you can just get the raw message from it. – hakre Oct 07 '11 at 09:59
  • @hakre yeah i was thinking about switfmailer, use it to compose a message with attachment then pass it in to SendRawEmail. Will SES accept the output of switftmailer? Well i guess they all work on standarts so it should work. – arma Oct 10 '11 at 17:18

2 Answers2

0

This is very similar to this other post here: Sending email with attachment using amazon SES

Rather than posting the answer again here, please see that post for the implementation that worked for me.

Community
  • 1
  • 1
RightHandedMonkey
  • 1,718
  • 20
  • 25
0

Thanks to suggestions from hakre i found this swift mailer transport https://github.com/jmhobbs/Swiftmailer-Transport--AWS-SES and now i use swift mailer to handle all my e-mails with attachment and without directly to SES.

arma
  • 4,084
  • 10
  • 48
  • 63
  • Can you please post your code to add an attachement. I am able to send email with it, but not sure how to send a file attachment. – Anon21 Jan 08 '12 at 14:50
  • @ Alexandre H. Tremblay just use it same as you would attach via swiftmailer. Look for documentation of swiftmailer. – arma Jan 27 '12 at 12:14