BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 09-12-2007, 06:21 AM   #1 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default adding an extra header to an email

Please Login to Remove!

i have added an menuitem on the compose e-mail screen and would like to add an extra header.
i can add recipients or modify the subject but addheader seems not to be working.

Code:
public Object run(Object context) {
try{                	
Message message = (Message) context;          
Message message = (Message) context;                
message.addHeader("REPLY_TO","user@domain.com");
message.addHeader("X-VOODOO", "voodoo on");
...
i call getAllHeaders() to check if the new header is set but the resulting enumeration is empty.

Any idea?
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 09-12-2007, 10:14 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you could explicetly select them with the method below..?

RIM Device Java Library: Class Message)
Offline  
Old 09-12-2007, 10:25 AM   #3 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

it seems that the API allows only certain headers to be set, don't ask me why. If i add a 'TO:' header my code works well.
Seems that i'll have to find a new idea to mark certain messages, maybe add some text into the body.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 09-12-2007, 11:27 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

oh yeah, I should've looked: These are the guys you want
RIM Device Java Library: Interface Message.RecipientType

Address[] addresses = new Address[1];
addresses[0] = to;
message.addRecipients(Message.RecipientType.TO, addresses);

where to is some Address
etc.
Offline  
Old 04-16-2008, 06:13 AM   #5 (permalink)
New Member
 
Join Date: Apr 2008
Model: 7100v
PIN: N/A
Carrier: Vodafone
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default struck at similar situation

Simon or others,

COuld you tell me is it possible to add extra headers or is there any other way??
Offline  
Old 04-16-2008, 07:08 AM   #6 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

I haven't found it documented anywhere, but from what I've been able to do it looks like headers other that the small set supported by the device are silently ignored during transmission.

I would love for some one to prove me wrong though.
Offline  
Old 04-16-2008, 07:26 AM   #7 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hrbuckley is right, i found no way to add extra headers to an email
__________________
java developer, Devinto, hamburg/germany
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Mac Tools vintage TW3FRAN swivel head torque wrench 1/2"d x 20"
$42.0
Mac Tools vintage TW3FRAN swivel head torque wrench 1/2MAC TOOLS D.C. 600 Amperes Meter/Gauge Vintage Rare 1
$9.99
MAC TOOLS D.C. 600 Amperes Meter/Gauge Vintage Rare 1 pictureVintage Mighty Mac sprayer Cub Cadet mounted instructions
$7.99
Vintage Mighty Mac sprayer Cub Cadet mounted instructions pictureVintage Williams wrenches Nice Snap-On Industrial (SK, MAC, Matco, Blue Point)
$27.0
Vintage Williams wrenches Nice  Snap-On Industrial (SK, MAC, Matco, Blue Point) pictureVINTAGE APPLE MOUSEPAD II IIC IIE MAC MACINTOSH 1984 1985 RETRO
$9.99
VINTAGE APPLE MOUSEPAD II IIC IIE MAC MACINTOSH 1984 1985 RETRO picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.