# Complete URL in the email body

**URL:** <https://www.ruby-forum.com/t/complete-url-in-the-email-body/192844>\
**Category:** Rails\
**Created:** [August 6, 2010, 8:29pm UTC](https://www.ruby-forum.com/t/complete-url-in-the-email-body/192844 "2010-08-06T20:29:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahtasham82](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@ahtasham82](https://www.ruby-forum.com/u/ahtasham82)\
**Post date:** [August 6, 2010, 8:29pm UTC](https://www.ruby-forum.com/t/complete-url-in-the-email-body/192844/1 "2010-08-06T20:29:39Z")

</div>

Hi

First of all, I am very very new with Ruby/Rails…I am working on  
maintenance of a project with a team.

I created some tracking code for an email…created a new tracking  
controller with script/generate…now all is fine…but the problem is  
that I am displaying an image in the email and for that I need to  
embed the complete HTTP URL with the image so the image can be  
displayed in the email.

so right now the source of my image in the email is /tracking/pixel/?  
sub=abc but it suppose to be [http://mysite.com/tracking/pixel/?sub=abc](http://mysite.com/tracking/pixel/?sub=abc)

I am experience with PHP and know all how to do that in LAMP but total  
new with Ruby/Rails so if someone can explain a little…I did hear  
that it has something to do with the helper and routes but I cant find  
out anything on these helpers and routes either.

Looking forward to your quick reply.

---

<div class="post-metadata">

**Author:** ![ahtasham82](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@ahtasham82](https://www.ruby-forum.com/u/ahtasham82)\
**Post date:** [August 6, 2010, 9:41pm UTC](https://www.ruby-forum.com/t/complete-url-in-the-email-body/192844/2 "2010-08-06T21:41:40Z")

</div>

On 6 August 2010 16:16, ahtasham82 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> so right now the source of my image in the email is /tracking/pixel/?  
> sub=abc but it suppose to be [http://mysite.com/tracking/pixel/?sub=abc](http://mysite.com/tracking/pixel/?sub=abc)

Just put the full URL string as you have shown it above in the  
image\_tag.

Colin
