[Closed] maxscript mailto: emailadres
Heya all,
I would like to have a hyperlink in my maxscript and when it got clicked it open the outlook express to send a mail.
The same as when you click on a website mail to button.
This is the code I thought that should do it, but obviously it doesn’t work (else I wouldn’t be posting).
Anyone knows what I did wrong or anyone that succeeded with this in another way ?
Any help would be greatly appreciated !
hyperLink mail_to "email : email@gmail.com" address:"mailto:email@gmail.com"
Do you have a default email client installed? It wouldnt work otherwise, anyway, have you looked at dotnet Process.Start ? That might do it, I’m not sure.
Process = DotNetObject "System.Diagnostics.Process"
Process.Start "mailto:email@mail.com@
Something like that.
(
theAddress = "youremail@yourcompany.com"
theSender = "myemail@mycompany.com"
theSubject = "Greetings from 3ds Max!"
theBody = "This email was sent by MAXScript
"
theBody += "from inside of 3ds Max!
"
theBody += "Cool, eh?"
theServer = "smtp.myprovider.net"
res = NetworkManager.Send theAddress theSender theSubject theBody theServer
if res then
messagebox ("Email sent successfully to " + theAddress)
else
messagebox ("Failed to send email to " + theAddress)
)
mailto is valid inside html page but address property of hyperLink could be string sent to ShellExecute. for instance, this is also valid:
hyperLink pic "image" address:"c:/temp/foo.jpg"
i.e. ‘mailto’ would not work with hyperLink.