Results 1 to 13 of 13

Thread: Link specify on outlook mail....

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Smile Link specify on outlook mail....

    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

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Link specify on outlook mail....

    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
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

  3. #3
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default Re: Link specify on outlook mail....

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Link specify on outlook mail....

    Escape quotes with backslashes.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default Re: Link specify on outlook mail....

    Its giving error asking to verify the switches. Can u write it and show me please wysota

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Link specify on outlook mail....

    Qt Code:
    1. char *str = "aaa \" bbb \"";
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default Re: Link specify on outlook mail....

    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

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Link specify on outlook mail....

    I don't see a single backslash in your code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default Re: Link specify on outlook mail....

    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

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Link specify on outlook mail....

    Are you serious or are you just mocking me? See post #6.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #11
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default Re: Link specify on outlook mail....

    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.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Link specify on outlook mail....

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  13. #13
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Link specify on outlook mail....

    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.

Similar Threads

  1. Replies: 11
    Last Post: 5th May 2011, 14:05
  2. How to open Outlook using Qt
    By votinh in forum General Programming
    Replies: 2
    Last Post: 21st June 2010, 16:13
  3. Replies: 3
    Last Post: 29th October 2009, 21:13
  4. Outlook problem
    By GianMarco in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 17:02
  5. Replies: 4
    Last Post: 17th June 2007, 10:30

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.