Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am trying to embed an image in my html mail body using as follows:
<img src="/muc/sites/default/files/Applicant2.jpg" />
Hello
But mail is not being sent. Error:"Message body empty." However, if I use absolute path like
<img src="http://localhost/muc/sites/default/files/Applicant2.jpg" />
Hello
Mail is being sent but to my gmail account, but image is not visible. As it becomes a remote content. I have read all readme.txt, done googling etc. but didn't find any resolution.
Kindly help me out.
Comment | File | Size | Author |
---|---|---|---|
Mimemail_image.JPG | 40.59 KB | sachin.lal |
Comments
Comment #2
chrlvclaudiu CreditAttribution: chrlvclaudiu as a volunteer commentedHi,
Is this
http://localhost/muc/sites/default/files/Applicant2.jpg
the URL you're sending within the email ?If so, then there's no way the browser will find this image as it's an place not accessible from the Internet. Replace
localhost
with an URL which is visible from the Internet.Hope this helps.
Claudiu