PDA

View Full Version : Link specify on outlook mail....



sujan.dasmahapatra
3rd October 2011, 21:27
Dear Friends

I am opening MS Outlook from my application. Its nicely opening. I want to wirte a text,e.d /home/sdh/app.exe this string as a link. Means when the mail goes the user should be able to click on the click and the application starts. I ca write this using.

QString command = " /c ipm.note /m " + emailids + "&subject=New%20Student" + "&body=/home/sdh/app.exe" + "\n";

arguments << command;

process.start(program,arguments);



Now how can I specify the body is a link.

Please give me some idea help me please. Thanks sujan

ChrisW67
4th October 2011, 02:05
Possibly by encoding an HTML anchor (<a href="/home/sdh/app.exe">Click here</a>). However, the link is useless to the recipient unless:

the executable can be found on the user's machine in exactly the same location
their browser/email program will allow a link to an executable through virus/trojan filtering
their browser/email program will allow it to run

sujan.dasmahapatra
10th October 2011, 15:19
how can I write this into the switch....

QString command = " /c ipm.note /m " + emailids + "&subject=New%20Student" + "&body=(<a href="/home/sdh/app.exe">Click here</a>)" + "\n";

If I write like this its giving error.....Double quote inside double quote. Please tell me how can I write the html anchor. Thanks a lot sujan

wysota
10th October 2011, 15:36
Escape quotes with backslashes.

sujan.dasmahapatra
10th October 2011, 17:59
Its giving error asking to verify the switches. Can u write it and show me please wysota

wysota
10th October 2011, 18:07
char *str = "aaa \" bbb \"";

sujan.dasmahapatra
10th October 2011, 18:22
I am doing like this but link is not coming it coming as plain text. like this <a href=sturec.exe>Click here</a>
QString str = "sturec.exe";
body.append("<a%20href=" + str + ">Click%20here</a>");


Please help me what can I do.......Thanks sujan

wysota
10th October 2011, 18:24
I don't see a single backslash in your code.

sujan.dasmahapatra
10th October 2011, 18:36
Theres no folder path right. Only the file name it has to open. so theres no backslash. I s iot wrong. I just have to give the link to "sturec.exe" please write what should I wirte. Thanks Sujan

wysota
10th October 2011, 19:09
Are you serious or are you just mocking me? See post #6.

sujan.dasmahapatra
10th October 2011, 19:14
body.append("<a%20href=sturec.exe>STUREC</a>");

Is this correct.....Only link sturec.exe, no folder path.......Its not working. Please tell me what to do.

wysota
10th October 2011, 19:37
I still see no backslashes in your code. Do you understand what "escape with a backslash" means? Please analyze post #6 character by character until you reach the proper conclusion.

ChrisW67
11th October 2011, 01:59
I think this approach will ultimately be fruitless as Outlook appears to be encoding the HTML anchor (post #7) rather than treating it as HTML anyway. I suspect the OP will need to use ActiveX (through ActiveQt) to automate Outlook in order to be able to send complex messages.