PDA

View Full Version : Can this be done?


abnrange
10-20-2008, 05:49 PM
I would like to create an app that will send multiple emails by group or user. Can this be done? Please see attached image. Thanks

pjborg
10-20-2008, 07:58 PM
Maybe this will help:

http://www.indigorose.com/forums/showthread.php?t=22231

I think you can send to as many people as you want.

pj

presidente
10-20-2008, 10:06 PM
Here is a little command-line program to send mails.

You can use it in AMS with File.Run.

http://sapco.info/software/minimail.zip


The parameters to send the mail are:

1. MailServer
2. User name of the mail account
3. Password for the Mail account
4. Mail adress of the Sender (optional)
5. Name of the Email Sender (optional)
6. Mail adress of the Recipient
7. Subject of the Email (optional)
8. Text of the Email (optional)
9. Attachment (optional)



Usage:
minimail.exe "MailServer" "User Password" "Sender_Email" "Sender_Name" "Recipient" "Email_Subject" "Email_Text" "Attachment"

example with all parameters used:
minimail.exe "smtp.yahoo.com" "johnsmith@yahoo.com" "thatsmypassword" "johnsmith@yahoo.com" "John Smith" "hannah.montana@television.tv" "Thats the reason of my Email" "This could be a long text, but i want to make it short." "c:\Myfile.zip"


example without sending Subject and Attachment:
minimail.exe "smtp.yahoo.com" "johnsmith@yahoo.com" "thatsmypassword" "johnsmith@yahoo.com" "John Smith" "hannah.montana@television.tv" "" "This could be a long text, but i want to make it short." ""

minimail.exe writes the result of Email-sending to the file minimail.History.txt.
There you can see if there was an error sending the mail.

azmanar
10-21-2008, 05:10 AM
Hi,

Can you do an example in APZ?

Thank you.

abnrange
10-21-2008, 08:03 AM
Thanks I will give that a try.

presidente
10-21-2008, 11:16 AM
Here you can download a little client I made.

The data for the mail-account is stored in an ini-file

http://sapco.info/software/MailClient-minimail.zip

http://sapco.info/software/minimail1.jpg

http://sapco.info/software/minimail2.jpg

The command-line client i have uploaded again.
Now he can send to a BCC adress and can send an attachment too.

http://sapco.info/software/minimail.zip

garagestudios
07-14-2009, 11:54 AM
Great stuff! Is there a way I can have it pass the email and attachments to the default email client? I want the user to use their email client, not have the message sent directly from the application.

Thanks!

Dave Wilson
07-20-2009, 04:12 PM
I have been working on a similar problem.
I need the CD to send an e-mail using the default client if possible with information that the user enters.
I have it working, but am running into an error that I think is related to the length of the File.OpenEmail command string.

I built a file on the users desktop named email.lua

TextFile.WriteFromString(_DesktopFolder .."\\email.lua","File.OpenEmail(\"",false);
Then added the input from the user to the file.

When complete

File.OpenEmail("CDADMIN@test.COM?&Subject=CD PASSWORD REQUEST = Z09104082235734&Body=%0D%0AZ09104082235734%0D%0ASend the CD password via encrypted e-mail to the administrators%0D%0Atest%0D%0ADAVE WILSON%0D%0A999-999-9999%0D%0A%0D%0A",SW_SHOWNORMAL);
I then run the email.lua as an application

Application.RunScriptFile(_DesktopFolder.. "\\email.lua");

If I add too much to the command it returns an error.
Does anyone know what the maximum length of the command line can be?

garagestudios
07-30-2009, 02:05 PM
What is in the email.lua file? Can you post that? Does that allow you to add attachments to the default email client?