 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
iason
Joined: 01 Nov 2005 Posts: 125
|
Posted: Wed Mar 28, 2007 8:43 pm Post subject: Help with Mailto link |
|
|
AHK works with mailto links. You can do
| Code: | | run, mailto:somebody@somemail.com?subject=Mail subject&body=Dear Sir, |
Any idea about how to insert line-breaks in "body"?
Can the body-text be for example
Dear Sir,
I saw in your webpage that...
bla bla... _________________ help to be helped |
|
| Back to top |
|
 |
iason
Joined: 01 Nov 2005 Posts: 125
|
Posted: Wed Mar 28, 2007 8:53 pm Post subject: Re: Help with Mailto link |
|
|
I found it:
| Code: | | run, mailto:somebody@somemail.com?subject=Mail subject&body=Dear Sir`,`%0Asecond line... |
"`%0A" makes a line break.  _________________ help to be helped |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Wed Mar 28, 2007 8:57 pm Post subject: |
|
|
| Quote: | you must use ASCII hexadecimal equivalents as variables for punctuation characters.
Eg. the following variables are used to represent commonly used characters:
Space ( ) %20
Comma (,) %2C
Question Mark (?) %3F
Period (.) %2E
Exclamation Point (!) %21
Colon ( %3A
Semicolon ( %3B |
|
|
| Back to top |
|
 |
iason
Joined: 01 Nov 2005 Posts: 125
|
Posted: Wed Mar 28, 2007 9:00 pm Post subject: |
|
|
Thanks for the info Bobo. Just edit your post, they mess with smilies... for everyone to know.  _________________ help to be helped |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Wed Mar 28, 2007 9:09 pm Post subject: |
|
|
| Code: | you must use ASCII hexadecimal equivalents as variables for punctuation characters.
The following variables are used to represent commonly used characters:
Space ( ) %20
Comma (,) %2C
Question Mark (?) %3F
Period (.) %2E
Exclamation Point (!) %21
Colon (:) %3A
Semicolon (;) %3B |  |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 710 Location: Florida
|
Posted: Mon Aug 06, 2007 1:18 pm Post subject: |
|
|
This topic has already helped me out a lot, but does anyone know how to get a % sign in the body to work?
| Code: | | run, mailto:somebody@somemail.com?subject=Mail subject&body=This does not work 100% at all! |
Results in:
This does not work 100?0at all!
I know this is more of a mailto question and not really related to AHK, but if you know how to get mailto do display that % I'd love to know! _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1158 Location: Denmark
|
Posted: Mon Aug 06, 2007 1:26 pm Post subject: |
|
|
URL Encoding _________________ there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face
- Kashmir |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 710 Location: Florida
|
Posted: Wed Aug 08, 2007 4:56 pm Post subject: |
|
|
| Code: | | run, mailto:somebody@somemail.com?subject=Mail subject&body=This works 100`%25! All right!! |
Thanks - That page looks like a great resource too. _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
t0rch1t
Joined: 17 Aug 2007 Posts: 10
|
Posted: Fri Sep 07, 2007 8:37 pm Post subject: Sending email with attachments. |
|
|
| Rhys wrote: | | Code: | | run, mailto:somebody@somemail.com?subject=Mail subject&body=This works 100`%25! All right!! |
|
Is there anyway to add an attachment to the email using this method? I am trying to write a script that will send an attachment. I tried the following code, but it bombs when it gets to where I enter the name of the file I want to send. The email client is outlook. Thanks for any help.
| Code: | run, mailto:someuser@somehost.com
sleep, 1000
ifwinnotactive, Untitled Message,,winactivate, Untitled Message,
send,Problems with server{ENTER}
send ,{ALTDOWN}il
send, c:\goodcount.txt
send,{ALTDOWN}s |
|
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Fri Sep 07, 2007 9:42 pm Post subject: |
|
|
you may have to have another winwait for the file attachment dialog before sending the file name. Alternately, instead of attaching the file, you could read the contents of the file onto the clipboard, then paste into the email.
You are also only using Alt down, and not releasing the key (also note {alt down} vs {altdown}
a few versions to try
| Code: |
run, mailto:someuser@somehost.com
sleep, 1000
ifwinnotactive, Untitled Message,,winactivate, Untitled Message,
send,Problems with server{ENTER}
send ,{ALT DOWN}il{alt up}
send, c:\goodcount.txt{enter}
send,{ALT DOWN}s{alt up}
|
| Code: |
run, mailto:someuser@somehost.com
sleep, 1000
ifwinnotactive, Untitled Message,,winactivate, Untitled Message,
send,Problems with server{ENTER}
send ,!il
send, c:\goodcount.txt{enter}
send,!s
|
| Code: |
run, mailto:someuser@somehost.com
sleep, 1000
ifwinnotactive, Untitled Message,,winactivate, Untitled Message,
send,Problems with server{ENTER}
FileRead, clipboard, c:\goodcount.txt
sleep, 100
send, ^v{enter}
send,!s
|
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 1017 Location: switzerland
|
Posted: Fri Sep 07, 2007 9:50 pm Post subject: |
|
|
this works with thunderbird
| Code: | ;---------------------- SEND EMAIL ATTACHMENTS THUNDERBIRD MOZILLA -----------
; make a subfolder EMAILSTOSEND put here your files
I:=0
Loop,%A_scriptdir%\EMAILSTOSEND\*,,1
{
I++
filex=%filex%,file:///%A_LoopFileFullPath%
}
stringlen,L1,filex
stringmid,filex,filex,2,L1
TO2=garry@aolnet.tv ;first your adress here to test
TO=to='%TO2%'
stringsplit,CX,TO2,`@, ;not needed get variable CX1 maybe replace CX1 later
DATES=%A_DD%-%A_MM%-%A_YYYY% ;not needed just a datum
PR=%A_ProgramFiles%\Mozilla Thunderbird\thunderbird.exe
SB=subject=My subject
AT=attachment='%FILEX%'
BD=body=Hallo %CX1%`%0A`%0AHow are you ?`%0AI send you %I% files`%0A`%0AGreetings`%2C`%0A garry
ALL=%TO%,%SB%,%AT%,%BD%
run,%PR% -compose "%ALL%"
return
|
|
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 710 Location: Florida
|
Posted: Fri Sep 07, 2007 10:03 pm Post subject: |
|
|
This isn't working in Outlook, but I think it should:
| Code: | Mailto=Me@test.com
Subject=Testing Attachment
Body=Hi, does it work
File="C:\WebCenterStatus2.txt"
run, mailto:%mailto%?subject=%subject%&body=%body%&attachment=%file% |
I'll look at it more on Monday... It's the WEEKEND!! _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 710 Location: Florida
|
Posted: Mon Sep 10, 2007 1:29 pm Post subject: |
|
|
All of the documentation that I'm finding online points to this syntax being correct, but Outlook isn't attaching my file.
Can anyone try the following two commands in a CMD window and let me know if they work? (C:\test.txt should exist)
rundll32 url.dll,FileProtocolHandler mailto:test@test.com&attachment="C:\test.txt"
rundll32 url.dll,FileProtocolHandler mailto:test@test.com&attachment="C:\\test.txt" _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
iason
Joined: 01 Nov 2005 Posts: 125
|
Posted: Thu Sep 13, 2007 10:11 pm Post subject: |
|
|
None of them works.
This works: rundll32 url.dll,FileProtocolHandler mailto:test@test.com?body=bla
Probably something is wrong with the '&' - but i have no idea...  _________________ help to be helped |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 829 Location: London, UK
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|