# Adding headers to a TMail object

**URL:** <https://www.ruby-forum.com/t/adding-headers-to-a-tmail-object/57801>\
**Category:** Ruby\
**Created:** [April 14, 2006, 10:28am UTC](https://www.ruby-forum.com/t/adding-headers-to-a-tmail-object/57801 "2006-04-14T10:28:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [April 14, 2006, 10:28am UTC](https://www.ruby-forum.com/t/adding-headers-to-a-tmail-object/57801/1 "2006-04-14T10:28:39Z")

</div>

I get a header that is set on a TMail object using

my\_mail[“my-header”]

but I can’t seem to figure out from the docs how to add headers.

Can anyone show me an example of how to set the header “my-header” to  
“my-value”, please?

Mark

---

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [April 14, 2006, 1:11pm UTC](https://www.ruby-forum.com/t/adding-headers-to-a-tmail-object/57801/2 "2006-04-14T13:11:33Z")

</div>

Bleh, ignore this.

It is as simple as my\_mail[“my-header”] = “my-value”

Duff code in my tests was hiding the real problem!

Mark
