# Problem in Vcard generation

**URL:** <https://www.ruby-forum.com/t/problem-in-vcard-generation/103405>\
**Category:** Rails\
**Created:** [May 5, 2007, 1:30pm UTC](https://www.ruby-forum.com/t/problem-in-vcard-generation/103405 "2007-05-05T13:30:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![selvaraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@selvaraj](https://www.ruby-forum.com/u/selvaraj)\
**Post date:** [May 5, 2007, 1:30pm UTC](https://www.ruby-forum.com/t/problem-in-vcard-generation/103405/1 "2007-05-05T13:30:51Z")

</div>

I am trying to explore the vpim gem…

Using that i am trying to generate Vcard…Now I am able to generate  
vcard also i am able to send that vcard through mail.

If i try to open that vcard through thunderbird, all the fields  
getting stored in address book except mobile number, Here ia m send the  
code for adding mobile number into vcard…

if @bizcard\_label.mobile\_number!=""  
flag=1  
maker.add\_tel(@bizcard\_label.mobile\_number.to\_s) do |mob|  
mob.location=‘cell’  
mob.preferred = true  
end  
end

Above code mobile number will come as 10 digit number.

```
 Is my approach correct? or am i doing anything wrong?

```

regards  
Selva

---

<div class="post-metadata">

**Author:** ![selvaraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@selvaraj](https://www.ruby-forum.com/u/selvaraj)\
**Post date:** [May 8, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/problem-in-vcard-generation/103405/2 "2007-05-08T15:27:15Z")

</div>

Friends Any Idea?

Selvaraj wrote:

> I am trying to explore the vpim gem…  
> If i try to open that vcard through thunderbird, all the fields  
> getting stored in address book except mobile number, Here ia m send the  
> code for adding mobile number into vcard…
> 
> if @bizcard\_label.mobile\_number!=""  
> flag=1  
> maker.add\_tel(@bizcard\_label.mobile\_number.to\_s) do |mob|  
> mob.location=‘cell’  
> mob.preferred = true  
> end  
> end
> 
> Above code mobile number will come as 10 digit number.
