PDA

View Full Version : Sending email thru Maxscript


Kameleon
11-22-2005, 10:17 AM
Hi there anyone know how to send an email to various recipients thru Maxscript without the aid of external programs? Thanks in advance

Wahooney
11-22-2005, 10:54 AM
Not as far as I can see. You can launch an external app in max using an activeX control:
rollout RO "" width:162 height:300
(
activeXControl ax "mailto://email@email.com" pos:[17,10] width:129 height:126
)

createDialog RO

Kameleon
11-22-2005, 10:56 AM
Thanks but this is not quite what I wanted, I want something like Max notification e-mails, but with the possibility of having more than one mail recipient... maybe something that accesses the imapi layer on windows or something.... :\

magicm
11-22-2005, 12:42 PM
You can use the Winsock activexcontrol for this. The only problem is that (afaik) this control only ships with Visual Studio, not with Windows.

I wrote a simple example on how to connect to a mail server using the Winsock control. See the online reference topic "ActiveX By-reference Arguments for Methods and Events". Google-ing a bit for "smtp protocol" should get you some information about smtp commands and server responses.

Another way to have your script send an email could be to add a browser activexcontrol to your dialog and have it connect to a custom PHP page. PHP has a built-in mail command which is pretty easy to setup.

- Martijn

Kameleon
11-22-2005, 01:24 PM
Thanks alot, that was what I haved in mind, the activex thingie, I'll have to take a better look, I just wanted to know if it was possible :)

Wahooney
11-22-2005, 01:27 PM
Can you redistribute the winsock activex control?

Kameleon
11-22-2005, 01:30 PM
Err can you put that in other words ? I didnt quite understood it, I have Visual Basic Express installed, so I think the winsock control is there... and you can download it for free from the MS site

PS- By the way take a look at another application I'm developing, it's not directly related to maxscript, but its still some sort of script :) http://forums.cgsociety.org/showthread.php?t=295376

Wahooney
11-22-2005, 01:33 PM
If you make a plugin that uses it can people download/install it without installing VSE?

Kameleon
11-22-2005, 01:36 PM
I really dont know until I start to code it and see what it need, I dont do programming stuff for 2 years... the other application I've wrote only needs .NET Framework.. so I think it will be the same for this one... I think.

Kameleon
11-24-2005, 05:43 PM
Hi there, I've sucessefully developed this script with the help of an external application developed by me just to send out the email... but now I'm having some trouble in doing something like the Notify on Failure feature that Max has... anyone knows how can I access this info ? I've searched on CGTalk, Maxscript help.. and nothing... Bobo help please :D

j-man
11-24-2005, 05:47 PM
Hi,


Might be a bit late for you now but you could use a program like blat through the command line:

http://www.blat.net/


Kameleon
11-24-2005, 05:49 PM
Thanx pal, but I already knew that one... I prefered to write my own, although my goal was to write it all in maxscript, but I wasnt able to do that. Anyway I'm on a different problem right now :) Thanx once again.

magicm
11-24-2005, 08:15 PM
Here's a quick example how to send email using the winsock control. I think distributing the Winsock control is not allowed, so you will need to have it installed in order for this example to work!

- Martijn

j-man
11-25-2005, 09:32 AM
Thanx pal, but I already knew that one... I prefered to write my own, although my goal was to write it all in maxscript, but I wasnt able to do that. Anyway I'm on a different problem right now :) Thanx once again.

Well you did say without external programs. I'm keen to see how you get on anyway so good luck

J.

darkmoon3d
10-28-2006, 10:56 PM
Tried the winsock maxscript and can't seem to get the activex to work. I found a winsock file online at: http://www.dll-files.com/dllindex/dll-files.shtml?winsock and placed file in C:\WINNT\system32 but still can't get activex to work.

VisualActiveX-swamitized! has it listed as same id you have "{248DD896-BB45-11CF-9ABC-0080C7E7B78D}". Do I have to setup winsock to run or authorize? For example for maxmessenger script to run; had to enable it from 'computer management'.

CGTalk Moderation
10-28-2006, 10:56 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.