Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
prax83
Posts: 24
Registered: ‎10-23-2008
My Device: Not Specified

Need to send a page through Email in blackberry

[ Edited ]
Hi,
Say I have opened a page in BB and I need to send the page address to myself through email. How can I send this through a javascript call ???

I know we can send the Page address through Option >Send Address > email. But I need to do the same when I Click a link called Email this pape to myself

How to achieve this need ??? Please help ..
Message Edited by prax83 on 12-15-2008 06:28 AM
Please use plain text.
Guru I
Xandrex
Posts: 18,379
Registered: ‎07-29-2008
My Device: Z10 10.1.0.2312 / Playbook 2.1 / 8900 5.0
My Carrier: Vodafone France (SFR) & B&You

Re: Need to send a page through Email in blackberry

< a href = "$sendmail" >Email this page to myself < /a >


with in php : $sendmail = "mailto:$myemail?subject=$title&body=$url";
with $myemail a way of inputting the email address of the websurfer and $title the //html/title element and $url the self URL of the webpage ?

I don't know if it works.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Please use plain text.
Guru I
Xandrex
Posts: 18,379
Registered: ‎07-29-2008
My Device: Z10 10.1.0.2312 / Playbook 2.1 / 8900 5.0
My Carrier: Vodafone France (SFR) & B&You

Re: Need to send a page through Email in blackberry

but the best thing is to have the email sent by the webserver and not by the email client.
a simple form with an input field to type one's email address.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Please use plain text.
Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: Need to send a page through Email in blackberry

With Javascript you could probably write out the link dynamically; something like:

document.write( '<a href="mailto:myself@me.com?title=PageAddress&amp;body=' + escape( window.location ) + '">Email this page to myself</a>' );

I haven't tried it but in theory it should be possible.
Please use plain text.
Developer
prax83
Posts: 24
Registered: ‎10-23-2008
My Device: Not Specified

Re: Need to send a page through Email in blackberry

Thx 4 the reply but am not using any PHP in my web application... am using a Java appliaction with xml and JSP...i need to call this Email to myself in xml file.
Please use plain text.
Developer
prax83
Posts: 24
Registered: ‎10-23-2008
My Device: Not Specified

Re: Need to send a page through Email in blackberry

document.write( '<a href="mailto:myself@me.com?title=PageAddress&amp;body=' + escape( window.location ) + '">Email this page to myself</a>' );

 

I tried something like this but am not able to add the URL of the page 

 

current Senerio,

When the html page is loaded I am providing a link called Email this page to myself in the xml file. when the user clicks the link I can call a javascript......but dont know how to add the current page URL and send through email.

 

whether "myself@me.com" will get the mobile owner email ID? or it will send a mail to "myself@me.com".

 

 

Please use plain text.
Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: Need to send a page through Email in blackberry

The "myself@me.com" in my code was just a placeholder. You're supposed to replace that with the actual email address. Two questions:

1. Who is this email going to? To you (i.e. the author of the webpage) or to the user who is viewing the page? It's not clear from your questions as the "myself" is ambiguous.

2. What's the deal with the XML file? You've mentioned it twice but I have no idea what you're trying to do with XML.
Please use plain text.
Developer
prax83
Posts: 24
Registered: ‎10-23-2008
My Device: Not Specified

Re: Need to send a page through Email in blackberry

ok let me clear ur doubts..

 

1) email to myself is nothing but users email id who are going to use my application...suppose there are 10 different users who are using my application in their own BB then email to myself should  get those users email id in their own blackberry mobile.

 

2)we are pulling data into XML file and transfering into html file with the help of jsp file. So the code is mostley handeled by XML. So any thing we need to code should be placed in XML file or Jsp to some extent. Am I clear to you.

Please use plain text.
Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: Need to send a page through Email in blackberry

Thanks, that does answer my questions.

As for what you're trying to do, I don't know of any way to obtain the e-mail address of the user viewing the page. You definitely won't be able to access the email address directly, since that would be a privacy hole. There is also not to my knowledge a generic way to say "email owner of this device".
Please use plain text.
Developer
prax83
Posts: 24
Registered: ‎10-23-2008
My Device: Not Specified

Re: Need to send a page through Email in blackberry

ok forget about the email address of a mobile user since its a security issue .... but is there any way I can call the inbulit email option so that I can send mail to any one by typing the email address and also to attach the visited page url ???
Please use plain text.