Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon SES: double dot

I'm experiencing some weird behavior on Amazon SES. I have a webapp that sends html emails using SES, recently i've noticed that some images dont load after receiving the email.

The images are stored in S3.

After inspection i've noticed just in some cases that the url of the image is being modified. Taking this example: the url of the image is http://example.com/image_name.png, after sending the email the URL of the image become http://example.com/image_name..png (notice the double dot before the extension).

If i send the same email to gmail and hotmail, i experience this issue, but with different images. Gmail puts double dot in image_2.png and hotmail puts it in image_1.png.

Im using Codeigniter email class to send the emails via SMTP.

like image 733
AFRC Avatar asked Nov 16 '25 07:11

AFRC


1 Answers

Adding 'crlf' => "\r\n" fixed the issue with the following config:

/aaplication/config/email.php

<?php

$config['protocol']         = 'smtp';
$config['mail_smtp_secure'] = 'TLS';
$config['smtp_host']        = 'ssl://email-smtp.us-west-2.amazonaws.com';
$config['smtp_port']        = 465;
$config['smtp_user']        = 'user';
$config['smtp_pass']        = 'password';
$config['charset']          = 'UTF-8';
$config['mailtype']         = 'html';
$config['newline']          = "\r\n";
$config['crlf']             = "\r\n";
$config['wordwrap']         = TRUE;
$config['smtp_timeout']     = '20';
$config['bcc_batch_mode']   = TRUE;
?>

like image 64
Lahar Shah Avatar answered Nov 17 '25 21:11

Lahar Shah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!