Main Area and Open Discussion > General Software Discussion
Using a batch file to create a hyperlinked png or jpg image.
questorfla:
Down to last step if i can make it.
Need to activate "control+V" or "paste command" from within the batch file.
the deafult paste from location is the clipboard which would have the file needed so if i can run it, the file would insert(ie: paste) right where i want it in the body
I can get all the way to the body of he email, everything is done, it is addresses, notations made, subject written as needed, I guess COULD do it as an attachment but that would be be as impressive :)
I just want t be stubborn about it :)
Thanks for the help getting to here. The setup looks impossibly complex and i never thought it would get this close.
Ath:
My WinSendKeys (DC Thread) can apply 'Paste from ClipBoard' (Ctrl-V) from the command-line, to a specific open Window(title)...
questorfla:
Thanks ATH. I will try this today and let you know but it should work. I searched all over for the windows native function to apply ctrl+v and found nothing. Nor anything to activate Paste from within an email (other than writing a custom Outlook script which i had no idea how to do)
4wd:
OK, two questions:
1) Is the HTML you are sending to these recipients static, (ie. apart from the recipient email address everything is the same - although that's not really a requirement, it could be built on the fly) ?
2) Does it have to go through Outlook, (I mean, do you REALLY have to use Outlook to send it) ?
If the first answer is Yes and the second No then there is a very simple way to achieve what you want using a simple command line program.
SendEmail
Create your HTML message as a file embedding the graphics as Base64 encoded text and use it as an input to the program:
eg.
--- Code: Text ---<html><body>This is your basic test email with embedded clickable image.<br> <br> <a href=https://www.donationcoder.com/forum><img src="data:image/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAABGdBTUEAAK/INwWK6QAAAwBQTFRF8axU+euzyfH/Z46308as9syVGG3OmNj77sYv5OfsbLPxNb3+xrOM9Lx0wu7/9+OWWsv/tZE1u+z/xHYSOZHbYsv/76A9tOr/6+bb6IoU8fP1+dq08rJiwq93wYctSsT/8MtEucTRqeb/0/b+yJVSc5jMU8r/RML/89RkLpTiouT/4tvK3OHnrLnLkqnI+OakxqgvQLnza9L/8KNCpN78m+L/ctP/dsz8hNr/1tzj+uHC+Pn68tJZsK2Hi93/y9PbVMb/6shL7p448rBc+Nar9PHr9Nl05sZWpbG2VpHMvKV7ruj/9cKCfdn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MQQuDDwN8iw86UNGz6ARADDo3urgq5dO4WRcu23IM6JEyeunaqFJ0SoghROorkSNsr6fJxPFe5e6GE2CdSHQPyZDfiZQqxeDQgPNiz+gPhgPadiDBsVFTNmzBiz6tw18mgSZn/hkbFC0esWTbfRDjkoq9wybSlVf4ENFgIZEOHB4sUeixa9Yl5oXEjCGKOw0LxizLC7sH1qYWHvhYsxsuroE4BaARYcNHNdOgTV//LCX2jATwwEMiBCwJnKRVaFTUs04d7svqTJGBHu3btw9+4lWA1aVywJV/QRoEWq5C0x99gybQjqY3xHAiEoAhJAMVSbVW4y5vF44fTCkPF47ksAYQbk5dGjR+nW1taO5ry+HulUqyTNTUBwmgCg9lv0k0UAE4CgemSlB3S6UiFXQsiVCnGDWKGQhPOawQaEgDAvLGxyl/TVgZZ2hcSdIUCAt2igCd9RBPTgxhYzD2Nc62gDNn/V+4uUEi7Y0ISxBKdi9f79fT5VK1WENzcVlp1xHfKCFoAwEBMwC9NczY7B+BVP0qsUSkl4OI/X3Oze3MwLlyj3t/f9WC94AAQOi6vRhO/e0vGAFCMSuJ4B/e7mmZb2/fshLTKJJFwigQyppOq+AyABz924sIwiUBs0hYhJGOJqNkupaO/xeOh+lUqhUigaGp7crjbsYHO7VClphoJ2+OqB62nshxfYAmTmpaVbNkh6O60CJUHqQt3Xu6GOCcpwLGhzh7JjD3buXI1R/dLnxz53PU0AwIIW9X/+XLGeCYDAa3ZvwsnF3AHDHPrKvOzMpNOnoQ+2VBo/69P17VIVNHY41DPEEvxC5jrzssVntkzasqVykYO7sv1ZH+/HtsK+IgFlLSFznUPZV4s9PDw2lblLn8c/cGiTwusfLGvpfvSEScssY2P3ZqXquf8LC1IakBaIcFjySZ87AM6UJC1kmpG2/zcAsM3bpRDt7c+2C55N9AP8H/b+uGdasqyCAAAAAElFTkSuQmCC"></a></body></html>
Then in your command file you just need the line:
--- Code: Text ---sendEmail -f [email protected] -t [email protected] -s smtp.fromserver.com -u "Invitation" -o message-file=Invitation.html -o message-content-type=html
I've skipped the options for TLS, user, password, etc but they can be added if your mail server requires them.
I've tested this through Google' email system and it works fine.
The requirement to use Outlook shouldn't really be necessary as there will be a record of the sent email on the server that can always be accessed via IMAP/etc.
I sent you a test email to show you what you'll get ;)
Here's an online Base64 encoder for converting the images.
questorfla:
Hmm. :-\
OK I'm game. If this works I promise I will never doubt your prowess.
:D
Replies to questions:
No it does not have to go through Outlook i just need to get it to them via email
However, i am afraid there may be a slight issue in that it isn't html, it is an email like i sent you.
the png image is in the body of the email I will look for your reply have not looked at email this am yet
The output of the batch is a PNG image. Or could be a jpg i guess but i have not tried embedding hyper-link in jpg )
The Manual part is copying the png into an open email and anchoring the hyper-link into it
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version