*Experts* DiverDan Posted June 7, 2004 *Experts* Posted June 7, 2004 I can only use the user's default email program. System.Diagnostics.Process.Start("mailto:" & "ToEmailAddress" & "?subject=" & "re:Subject" & "&body=" & "EmailBody") sets the To email address, the subject and the email body. How can I also include a file attachment? Thanks Dan Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
*Experts* Nerseus Posted June 7, 2004 *Experts* Posted June 7, 2004 I thought you just used "attachment=path\filename". Haven't done this in a few years, but I think it's that simple... (maybe?) :) -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
*Experts* DiverDan Posted June 7, 2004 Author *Experts* Posted June 7, 2004 Hi Nerseus, Nope, "attachment=" didn't work. I've tried: "&attachment=" "?attachment=" "%attachment=" "attachments=" "&attachments=" "?attachments=" "%attachments=" Dan Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
*Experts* Nerseus Posted June 8, 2004 *Experts* Posted June 8, 2004 Should just be "&attachment=...". I tried this here and got the message "The command line argument is not valid. Verify the switch you are using.". I tried surrounding the file in double quotes, single quotes (no errors but no attachment), and referencing a hard-coded path like C:\ and a shared drive. I either got the above message or I got no attachment. Searching MSDN found the following article. Unfortunately, the URL:MailTo on my machine was exactly what they said it should be. http://support.microsoft.com/default.aspx?scid=kb;en-us;312346 I also tried making Outlook Express the default mail program and got basically the same results. Not sure what's wrong :) -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
*Experts* DiverDan Posted June 8, 2004 Author *Experts* Posted June 8, 2004 I read the same article and got the same results as you...So I copped out and referenced Outlook. If the user has Outlook installed then this feature will work, if not then no "Send To:" feature. I would have rather referenced their default email program, whatever it is, but I guess from what you and I found out that this is just not possible today. Thanks a million for all your assistance!!! Dan Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
MTSkull Posted June 10, 2004 Posted June 10, 2004 (edited) CLEmail I have for the most part given up on outlook if I can afford to. As an alternate I use the CLEmail (command Line email) program. Our IT Department uses it with batch files. It costs about 30 bucks and runs great. You do need certain admin rights to relay messages off the mail server and the server name (or better its IP). Its great for sending out alerts if your program does something funny, or to autoemail you if an unknown error pops up. I also use it as a mass emailer when sending order confirmations, shipment status reports, attaching spreadsheets to send to field reps, etc etc.. It only does plain text and does not look pretty, but it is reliable. Seems like I find a new use for it everyday. Certainly worth the 30 bucks so you do not have to jump through outlook's hoops to send an email. Might be a good option if you can get it set up to use in a network environment? MTS EDIT: Also a copy of the program will have to be installed on any computer that needs it. Or just one copy on a shared net drive. Edited June 10, 2004 by MTSkull Quote "Beer is proof that God loves us and wants us to be happy." -Benjamin Franklin
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.