If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

URGENT : How to send email by clicking hyperlink

Started by Shruthi, 11 Dec 2013 11:18:40 PM

Previous topic - Next topic

Shruthi

Hi


I have a requirement like when user clicks a Hyperlink it should send an email automatically.
In the email "TO" will be always static and subject also static.
I have used JavaScript code for the above scenario.

<a href="mailto:xyz@gmail.com?subject=example for email sending&body=example for email sending">Send Mail</a>

This can send email...but is it possible to send email without using Lotus Notes... i still have to use Lotus Notes to click the send
button.

How to send this email without using Lotus Notes?


Thanks

bdbits

What you have there is HTML and not javascript. The mailto: protocol simply uses whatever the local computer has as a registered email client. Assuming you have Lotus Notes then this is the expected behavior. If a user had another email client - say Outlook - then that would be used instead. It all depends on local machine configuration.

You cannot send email directly via javascript. If that was allowed, malicious people could write javascript code on a web page to send out emails every time you open the page. None of us wants that.

Shruthi

Is there any way to achieve my requirement?

In report studio when user clicks a Hyperlink it should send an email automatically.
In the email "TO" will be always static and subject also static.


MFGF

Bob explained - you can't. Using the mailto: pprotocol simply utilises the local email client. Sending email automatically via javascript is not allowed - for the reason Bob detailes above. This isn't a limitation of Cognos - it's a generic limitation. If you could find a way to do it from a normal HTML page you could do it in a Cognos report.

Regards,

MF.
Meep!

bdbits

There really is not a solely client-side solution you can embed in a Cognos report.

But, if you really must have this functionality and can get someone to write you a web service, you could then call that service from Javascript. If you go this route, you MUST be careful to secure the service, especially if this is on a public server. Otherwise it could easily get used by spammers or more nefarious types much like an open relay to send email that would appear to be sanctioned by the organization owning the emailing service host machine. This could make your client/employer look very very bad and lead to things like their email getting blocked. You want someone experienced with security issues setting this up. If the developer does not understand what I mean with what I just wrote, do not let them do it.