| View previous topic :: View next topic |
| Author |
Message |
ecksphore
Joined: 21 Nov 2006 Posts: 48
|
Posted: Mon Jan 21, 2008 11:31 pm Post subject: Run, Mailto: help needed |
|
|
Run, mailto:someone@domain.com?subject=This is the subject line&body=This is the message body's text
Now, is there anyway I can get it to include an file (attachment) to the email? |
|
| Back to top |
|
 |
BoBoĻ Guest
|
Posted: Mon Jan 21, 2008 11:41 pm Post subject: |
|
|
| Quote: | | Now, is there anyway I can get it to include an file (attachment) to the email? | Yes. Manualy. |
|
| Back to top |
|
 |
ecksphore
Joined: 21 Nov 2006 Posts: 48
|
Posted: Tue Jan 22, 2008 1:33 am Post subject: |
|
|
Have I done something wrong on this forum?
The is the 3rd time I've asked a question in here and got blown off.
I've seen "I need help now!!111" get more attention than my posts. |
|
| Back to top |
|
 |
DJAnonimo
Joined: 10 Sep 2006 Posts: 148
|
Posted: Tue Jan 22, 2008 1:54 am Post subject: |
|
|
Maybe because you ask for Mailto help
and not AHK.
I use mailto but just email field.
Sorry, cant help you |
|
| Back to top |
|
 |
ecksphore
Joined: 21 Nov 2006 Posts: 48
|
Posted: Tue Jan 22, 2008 2:05 am Post subject: |
|
|
| Run, Mailto: is a AHK command |
|
| Back to top |
|
 |
Trikster
Joined: 15 Jul 2007 Posts: 1224 Location: Enterprise, Alabama
|
Posted: Tue Jan 22, 2008 2:06 am Post subject: Re: Run, Mailto: help needed |
|
|
| ecksphore wrote: | | Run, mailto:someone@domain.com?subject=This is the subject line&body=This is the message body's text |
I believe Run is an AHK command, is it not?
But back on subject; I do not know of any way of doing this using mailto. But I know if you search for blat.dll usage, you will find a way to email attachments with AHK. _________________ ScriptPad | ~dieom | dieom | izwian2k7 | Ian | God |
|
| Back to top |
|
 |
ecksphore
Joined: 21 Nov 2006 Posts: 48
|
Posted: Tue Jan 22, 2008 2:13 am Post subject: |
|
|
Thank you  |
|
| Back to top |
|
 |
neXt
Joined: 18 Mar 2007 Posts: 463
|
Posted: Tue Jan 22, 2008 3:00 am Post subject: |
|
|
it depends on what type of email client you are using. Some support additional option "attachment" (i think), you can google for it (sorry, i don't remember how to do that exactly.)
If you are struggling with Outlook i found a solution for that, by copying and pasting a file.
this: http://www.autohotkey.com/forum/viewtopic.php?t=25416 will provide you with a function to place a file onto your clipboard, after that use WinActivate command to activate "new message" in outlook, then just send ctrl+v , that's it.
If you will get stuck, just post your code and i'll be glad to help. |
|
| Back to top |
|
 |
ManaUser
Joined: 24 May 2007 Posts: 906
|
Posted: Tue Jan 22, 2008 3:37 am Post subject: |
|
|
| You know how when you right-click a file one of the options is Send To->Mail Recipient? I wonder if it would be possible to use some variation of however that works. I investigated a little but it was beyond my skill. I doubt it would be too hard if you know where to start. Though I don't know for a fact that it's possible to set the recipient, subject, and body with that method. |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 1186 Location: switzerland
|
Posted: Tue Jan 22, 2008 10:14 am Post subject: |
|
|
this works with mozilla thunderbird
| Code: | CA=garryxxx@bluewin.ch ;here your adress for test
stringsplit,CX,CA,`@,
PR=%A_ProgramFiles%\Mozilla Thunderbird\thunderbird.exe
;PR=%A_ProgramFiles%\Outlook Express\msimn.exe
TO=to='%CA%'
SB=subject=My subject
FILE1=file:///c:\test.txt
FILE2=file:///c:\test.jpg
AT=attachment='%FILE1%,%FILE2%'
BD=body=Hallo %CX1%`%0AHow are you ?
ALL=%TO%,%SB%,%AT%,%BD%
run,%PR% -compose "%ALL%"
return |
outlook (?)
|
|
| Back to top |
|
 |
AutoHotkey Lover Guest
|
Posted: Fri Jan 25, 2008 12:07 pm Post subject: mailto with attachment |
|
|
Generally speaking: AutoHotkey is a great !
I introduced it in our company a while ago and the response
is very positive. The learning curve is small, the benefit is high !
Recently I wrote a software distribution tool based on AutoHotkey
and now we have a process monitoring tool which includes sending
textfiles back to the server.
Here is a little excerpt that shows the usage of the mailto command:
;--------------------------------------------------------------------------------------
; Sending emails from AutoHotkey is very simple by using the standard 'mailto' command
; The command launches the default mail application and creates a message.
; All you have to do is handle the send action.
; The following code has been successfully tested with MS Outlook
;
; Dieko Jacobi, 2008
; The general format of the mailto command is:
; mailto:email address[,next_email address] [?cc=carbon copy email_address] [&bcc=blind carbon copy email_address] [&body=Any text...]
; Address of the recipient(s)
address=user@domain.com
subject=Some feedback
; You can use the content from a text file with the FilerRead command.
; (Binary files can to be converted to hex values but that is another issue)
FileRead, body, C:\Textfile.txt
; ... or create the message:
body=Dear Sir,`r`nthank you for your contribution.`r`n`r`nHere is my response: AutoHotkey is great !`r`nBest regards,`r`n`r`n%A_Username%
; Compose the mailto string
msg=mailto:%address%?subject=%subject%&body=%body%
; Format the mailto command so it creates a nice message
stringreplace, msg,msg,%a_space%,`%20,all
stringreplace, msg,msg,`r`n,`%0d,all
; Run the command
run, %msg%
; Wait for the Outlook mail window to come up, identifeid by the subject line
winwaitactive, %subject%
; Time to breathe ...
sleep, 300
; ... and send it
send, {CTRLDOWN}{ENTER}{CTRLUP}
ExitApp
;EOF -------------------------------------------------------------------------- |
|
| Back to top |
|
 |
neXt
Joined: 18 Mar 2007 Posts: 463
|
Posted: Fri Jan 25, 2008 3:06 pm Post subject: |
|
|
Limited to only one attachment and you can't specify a header in your emails using those switches
AutoHotkey Lover, you should enclose your code in[code] tag. Otherwise it's impossible to read. |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 736 Location: Florida
|
Posted: Fri Jan 25, 2008 9:00 pm Post subject: |
|
|
This has frustrated me in the past as well. You can reliably do just about everything with mailto + parameters, but the attachment parameter doesn't appear to be fully (or at all?) supported by Outlook. _________________ [Join IRC!]
http://www.codeforcure.org/ |
|
| Back to top |
|
 |
|