Re: Implementing mailto: Mac
> >Thanks to Dave and Sjoerd for arriving at the elegant 2-line solution on a PC: > >put word 1 to -2 of \ > >queryRegistry("hkey_local_machine\software\classes\mailto\shell\open\command >\") \ > into tBrowserPath >launch "mailto:"&tAddress with tBrowserPath I think originally you wanted to do this within MC. I just found out there is nslookup for windows (probably a port from Linux) which can be called with "shell()" and return the mail server given the domain name([EMAIL PROTECTED]). Nslookup is here: http://www.trumphurst.com/dnsocx/nslookup.exe and the dos commands are : Using nslookup, you can find the email server of your domain, as shown in the sample session below. Start a MS-DOS command prompt (in our case we use shell()) and type the nslookup command: C:\> nslookup Default Server: youserver.yourdomain Address: X.X.X.X > set type=MX > microsoft.com microsoft.com MX preference = 10, mail exchanger = mail1.microsoft.com microsoft.com MX preference = 20, mail exchanger = mail2.microsoft.com microsoft.com MX preference = 30, mail exchanger = mail3.microsoft.com microsoft.com MX preference = 40, mail exchanger = mail4.microsoft.com microsoft.com MX preference = 50, mail exchanger = mail5.microsoft.com The lowest preference indicates the best (primary) mail server. A mailer would try it first and if it cannot connect to this server, it would use other servers (by order of preference). > >Now... Does anyone have the AppleEvent equivalent for a Mac? I also found a perl script which gets the mail server name from InternetConfig. It just needs to be translated into Metatalk: use Mac::InternetConfig; print $InternetConfig{kICSMTPHost()}; I tested it and it works I just don't know perl ;-) > >/H >Hugh Senior Regards, Andu ___ [EMAIL PROTECTED] Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Implementing mailto:
At 6:50 PM +0100 9/24/00, Hugh Senior wrote: >>set the hideConsoleWindows to true >>if "NT" is in the systemVersion then set the shellCommand to "cmd.exe" >>put "[EMAIL PROTECTED]" into tAddress >>put quote & "my Subject" & quote into tSubject >>put quote & "Hello." & quote into tBody >>put "start mailto:" & tAddress & "?subject=" & tSubject & "?body=" & >>tBody into tCom >>get shell(tCom) > >This worked first time as is. Okay, so Eudora doesn't handle the "?body" >param, but who the hell cares! Yeesh... /H is hoppin' an' jumpin' at this >point. > >The ONLY line of concern is "if NT is in the systemVersion". Is the >shellCommand still "cmd.exe" for Win95, Win98 and Win2000? It looks like you can avoid this issue altogether if you follow Sjoerd's suggestion. (Thanks, Sjoerd. Nice one.) However, if you do go with the shell function, setting the shellCommand to "cmd.exe" is recommended for NT in the MC reference. I've never got any shell command to work on NT without setting it, so I'd suggest you do it. Don't set it for Win 95/98; the default is set to work for those. But I don't know for Win 2000. Luckily, no one I'm developing for (mainly corporates) has any plans to install Win 2000 until next year. Does anyone know? On the same topic, can anyone using Win 2000 tell us what is returned by the the systemVersion function? Cheers Dave Cragg Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Implementing mailto:
Dave Cragg wrote/ schreef: > The basic shell command is "start mailto:". You would set it up > something like this: > > This should start the user's e-mail program with the to and subject > fields filled out. > To work, it requires the user to have set the default e-mail program > in the internet control panel. > Maybe this works better: put word 1 to -2 of queryRegistry("hkey_local_machine\software\classes\mailto\shell\open\command \") into tBrowserPath launch "mailto:[EMAIL PROTECTED]" with tBrowserPath Then you can chek the tBrowserpath Regards, Sjoerd Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Implementing mailto:
Yo - Dave, my main man! >...you can get the user's e-mail program opened and set up more directly >using the shell command on Windows. > >The basic shell command is "start mailto:". You would set it up >something like this: > >set the hideConsoleWindows to true >if "NT" is in the systemVersion then set the shellCommand to "cmd.exe" >put "[EMAIL PROTECTED]" into tAddress >put quote & "my Subject" & quote into tSubject >put quote & "Hello." & quote into tBody >put "start mailto:" & tAddress & "?subject=" & tSubject & "?body=" & >tBody into tCom >get shell(tCom) This worked first time as is. Okay, so Eudora doesn't handle the "?body" param, but who the hell cares! Yeesh... /H is hoppin' an' jumpin' at this point. The ONLY line of concern is "if NT is in the systemVersion". Is the shellCommand still "cmd.exe" for Win95, Win98 and Win2000? /H Hugh Senior The Flexible Learning Company Consultant Programming & Software Solutions Fax/Voice: +44 (0)1483.27 87 27 Email: [EMAIL PROTECTED] Web: www.flexibleLearning.com Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Implementing mailto:
At 10:27 AM +0100 9/24/00, Hugh Senior wrote: >Thanks to all who contributed to this thread. Using sendMail.mc without >self-configured SMTP preferences is, I fear, going to cause the potential >users too much confusion. I therefore revert to Plan B and, as suggested, >use a as the next best alternative. > >Plan is to: >[1] store a generic myEmailWindow.htm as a userProperty >[2] replace eMailVar on the fly in mailto:eMailVar">eMailVar >[3] put it into url(file:"&tPath) >[4] use EXT.dll to launch file tPath >[5] on quit, delete file tPath > >For elegance, the eMailWindow opens at a fixed size without distractions: > > Click here to send an eMail > >So a simple question... > >How do we include window display parameters in the myEmailWindow.htm and >thus avoid requiring a host window to launch it from? Is it possible? > >/H Hi Hugh I'm not quite sure what you're attempting here. Will this solution open the user's e-mail program, and then require the user to manually send the mail? Or is it more automatic than that. If the former, then you can get the user's e-mail program opened and set up more directly using the shell command on Windows. The basic shell command is "start mailto:". You would set it up something like this: set the hideConsoleWindows to true if "NT" is in the systemVersion then set the shellCommand to "cmd.exe" put "[EMAIL PROTECTED]" into tAddress put quote & "my Subject" & quote into tSubject put quote & "Hello." & quote into tBody put "start mailto:" & tAddress & "?subject=" & tSubject & "?body=" & tBody into tCom get shell(tCom) This should start the user's e-mail program with the to and subject fields filled out. With luck, the message body will also be filled out, but I think not all e-mailers handle that parameter. To work, it requires the user to have set the default e-mail program in the internet control panel. I guess you'll have to figure out the results from get shell to put up an appropriate message if this hasn't been set and the command fails. (My memory tells me that something is always returned in the result for this command, so relying on empty may not work.) Apologies if I'm off track here. Cheers Dave Cragg Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.