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

3rd October 2011, 20: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;


Now how can I specify the body is a link.

Please give me some idea help me please. Thanks sujan

4th October 2011, 01: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

10th October 2011, 14: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

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

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

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

10th October 2011, 17: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

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

10th October 2011, 17: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

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

10th October 2011, 18:14

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

10th October 2011, 18: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.

11th October 2011, 00: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.