Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 15 of 15
  1. #1
    Join Date
    Jun 2008
    Posts
    108

    SMTP Mail send Tool (command-line)

    This is a little command-line program to send mails.

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

    It´s easy to use and can send attachments too.
    It can be simply used with File.Run in AMS

    Code:
    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.

  2. #2
    Join Date
    Jun 2008
    Posts
    108
    Here you can download a little client I made with the command-line client.

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

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





    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

  3. #3
    Join Date
    Oct 2002
    Location
    RealFake, RF
    Posts
    403
    Very cool!
    "White-colla-AMS-gangsta."

  4. #4
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Works very well. Need to be able to also set the port though. For example when using an SMTP server from GoDaddy, you have to be able to set the port.

    Nice job though, thanks for sharing.
    Dermot

    I am so out of here

  5. #5
    Join Date
    Jun 2008
    Posts
    108
    @Dermot

    Download it again! Now the client have a parameter for the Port.
    So you can set the Port for the SMTP-Server for use it with GoDaddy etc.

    If you need a commnd line POP3 client, I can make it too.
    Last edited by presidente; 10-21-2008 at 03:19 PM.

  6. #6
    Join Date
    Feb 2006
    Posts
    346
    Nice job - Thanks for the sample

    Can you make a sample pop3?

  7. #7
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    So if i don´t modify the code inside...

    So if i don´t modify the code inside off AMS and i publish will not work

    how to set by default the parameters, so that way allways send to the same address with out asking the user the destination off the mail and the user does not need to see the setup panel like a form contact

    when i publish the webexe with out modify any thing when i try to set-up the mail server and stuff i cant send mail. why?
    how to modify the code for this work rigth

    thanks sorry for my bad english and semantics

  8. #8
    Join Date
    Jun 2008
    Posts
    108
    Just alter the variables.
    Don´t read them from the input and put them static into the code.

    If you make a webexe, the ini file is deleted everytime you close the program, because the webexe make the ini-file in a temporary folder.
    So, next time you run the webexe the files are unpacked newly in a temporary folder and the ini-file is empty.

    If it don´t works, could be that the data you put into the Mailaccount data is wrong.
    You have to put the smtp-server in the mailserver field. Possibly you have putted the pop3 server.

    Or the login-data is wrong. Check the username. Sometimes server want the mail-adress like login e.g. mymail@yahoo.com.

    If you don´t set the port, the programm set the port 25.
    Maybe you need another port.

    Look into the code (is very vew and easy) and so you learn quickly how to use the program for your needs.

  9. #9
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Nice job - but wouldn't using blat.dll be a better/cleaner way to go?


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  10. #10
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    Thanks Presidente Man...

    Quote Originally Posted by presidente View Post
    Just alter the variables.
    Don´t read them from the input and put them static into the code.

    If you make a webexe, the ini file is deleted everytime you close the program, because the webexe make the ini-file in a temporary folder.
    So, next time you run the webexe the files are unpacked newly in a temporary folder and the ini-file is empty.

    If it don´t works, could be that the data you put into the Mailaccount data is wrong.
    You have to put the smtp-server in the mailserver field. Possibly you have putted the pop3 server.

    Or the login-data is wrong. Check the username. Sometimes server want the mail-adress like login e.g. mymail@yahoo.com.

    If you don´t set the port, the programm set the port 25.
    Maybe you need another port.

    Look into the code (is very vew and easy) and so you learn quickly how to use the program for your needs.
    I Will Mess With It, and i will get the solution.

    Let me tell you something if we need a presidente here i will let you Know

  11. #11
    Join Date
    Dec 2008
    Posts
    5
    Hi there Guys, I am just a beginner with AMS, I have version 7 and I was wondering about sending email field into an app created with AMS.

    Yesterday afternoon I spent lost of time, almost the whole journey to look for information on making it works for me, but It was almost impossible. I found good ways to do it, but most of them required an external help´, plugin or code to be saved to the server. Since I am a student, it is dificult for me to afford that, so I would like the aplication to send an email by itself with no external help or plugin. I tried to do it by making an Input field and a pressing objet to send the email by taking the information to a text file and loading to my ftp quota ant the University, but firewall didnt allow it, and it is very difficult to find the authorization from directives to allow that, so I got interested on this example, but I can`t get all the steps, Could you make it clearer please?.

    AMS application I am on the process of is a pack of free tools to fix pc problems and includes ccleaner, regseeker, security free apps from Antivirus sites and that stuff, to be used at Students Lab at my faculty. Then I want to add a "give your opinion chart" and that information to be sent to my email. I have hotmail, gmail, yahoo and my university (i know it is php) email accounts, but when I finish to study, I will lost my php university email account, so that is way I`m looking for a "Standalone" way into the soft to do it, and to be able to send it to anyone of the free accounts I mentioned.

    Best Regards...

  12. #12
    Join Date
    Jun 2008
    Posts
    108
    Double-click on the "Send Email"-Button on page 2

    There is all the code you need.

    In line 48 the argument are putted together, and in line 51 the exe is called with the arguments.

    Thats all the code you need. It´s really very easy.

    The rest of code is the getting of code from the input-fields.

    On [Project][Actions] the parameters for the mail account are set, because the project uses an ini-file to store them.
    But that you can do directly in the line 48 of the button-code.

    So, just look at the line 48 and 51 of the code for the "Send Email"-Button on page 2.
    Thats all you need to solve your problem.

  13. #13
    Join Date
    Dec 2008
    Posts
    5
    Thanks for the explanation Presidente, but I have to say the files uploaded are not anymore. When I tried to download files you posted from http://sapco.info/software/minimail.zip, it got me 404 error page does not exists. I tried with mozilla, Internet Explorer 7 and Opera and none ofo them could access the site.

    Could you upload the example again please?.

    Thanks anyway for the help so far...

  14. #14
    Join Date
    Jun 2008
    Posts
    108
    Now the links are working again.
    The directory was moved to a wrong place.

  15. #15
    Join Date
    Sep 2008
    Posts
    55
    When I use this it sends correctly, but nothing after the
    Code:
    File.Run("AutoPlay\\Docs\\minimail.exe", minimail_Args, "", SW_SHOWNORMAL, false);
    works correctly. It give me the 'autoplay has stopped working' error and shuts down abruptly. I have no idea why this is happening. It is not waiting for a return, so maybe it is trying to run the minimail.exe while trying to execute the rest of the code. I have tried changing the wait for return to true and just have it go in an arbitrary variable, with no luck. Please let me know if anyone else is having this same problem, or just me.

    Thanks,
    MSP

Similar Threads

  1. send mail to yahoo or gmail?
    By sara2006 in forum AutoPlay Media Studio 6.0
    Replies: 5
    Last Post: 12-30-2006, 01:23 AM
  2. Example: Send Email using SMTP Authentication
    By Worm in forum AutoPlay Media Studio 5.0 Examples
    Replies: 5
    Last Post: 04-29-2006, 06:28 AM
  3. getting system value and send by mail..
    By aviranak in forum AutoPlay Media Studio 6.0
    Replies: 19
    Last Post: 01-07-2006, 03:43 AM
  4. Mail Anywhere v.1.0.0
    By sside in forum AutoPlay Media Studio 5.0
    Replies: 9
    Last Post: 03-07-2005, 11:47 AM
  5. Send Mail After Install
    By Chris Wasley in forum Setup Factory 6.0
    Replies: 2
    Last Post: 02-03-2003, 09:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts