how to send an e-mail to my gmail address from bat file

Все, что вы хотели знать о программизме, но боялись спросить.
Ответить
Аватара пользователя
dima
Житель
Сообщения: 690
Зарегистрирован: 19 фев 2003, 19:26
Откуда: Хабаровск->Toronto

how to send an e-mail to my gmail address from bat file

Сообщение dima »

Hi all

Windows XP pro 32 bit.

I want to send e-mail from bat file. Just two lines in body, 50 chars in subject.
I want to send e-mail to gmail.com

Is that possible ? did anybody do that ?

thx
Аватара пользователя
Vims
Northern Yeti
Сообщения: 21443
Зарегистрирован: 17 фев 2003, 15:53
Откуда: Magadan - Vancouver
Контактная информация:

Re: how to send an e-mail to my gmail address from bat file

Сообщение Vims »

dima писал(а):Hi all

Windows XP pro 32 bit.

I want to send e-mail from bat file. Just two lines in body, 50 chars in subject.
I want to send e-mail to gmail.com

Is that possible ? did anybody do that ?

thx
я делаю, не имеет значения куда слать. key word CLI SMTP utility http://www.beyondlogic.org/solutions/cm ... nemail.htm
CaptainBlack
Маньяк
Сообщения: 2063
Зарегистрирован: 07 июл 2008, 11:58
Откуда: Россия

Re: how to send an e-mail to my gmail address from bat file

Сообщение CaptainBlack »

dima писал(а):Hi all

Windows XP pro 32 bit.

I want to send e-mail from bat file. Just two lines in body, 50 chars in subject.
I want to send e-mail to gmail.com

Is that possible ? did anybody do that ?

thx

Blat - A Win32 Command Line SMTP Mailer (лучшее из того что я протестил в своей практике)
http://sourceforge.net/project/showfile ... p_id=81910
Аватара пользователя
dima
Житель
Сообщения: 690
Зарегистрирован: 19 фев 2003, 19:26
Откуда: Хабаровск->Toronto

Re: how to send an e-mail to my gmail address from bat file

Сообщение dima »

спасибо. они SSL не поддерживают
как я на gmail отправлю без SSL ?
(Alex)
Маньяк
Сообщения: 4203
Зарегистрирован: 08 мар 2006, 15:45
Откуда: Ричмонд

Re: how to send an e-mail to my gmail address from bat file

Сообщение (Alex) »

Достаточно отправить на любой SMTP server (например сервер провайдера, или поставь smtp на какой нибудь линукс), а оттуда оно само.
ura
Житель
Сообщения: 915
Зарегистрирован: 09 мар 2003, 22:46

Re: how to send an e-mail to my gmail address from bat file

Сообщение ura »

Если никакой универсальности не надо, то можно своять простенький exe на .net
с командной строкой. Код проверен на отправку через Gmail.

Код: Выделить всё

            SmtpClient client = new SmtpClient("smtp.gmail.com", 587);
            client.Timeout = 100000;
            client.EnableSsl = true;

            System.Net.NetworkCredential credentials = new System.Net.NetworkCredential"dima@gmail.com", "dima123");
            client.Credentials = credentials;
            client.Send("dima@gmail.com", "dima@hotmail.com", "Subject comes here", "Message Plain Text Body");
Аватара пользователя
dima
Житель
Сообщения: 690
Зарегистрирован: 19 фев 2003, 19:26
Откуда: Хабаровск->Toronto

Re: how to send an e-mail to my gmail address from bat file

Сообщение dima »

how that will send mail could not have Java or .NET installed.
This is what I found
http://msmtp.sourceforge.net/documentation.html
Аватара пользователя
CdR
Графоман
Сообщения: 11245
Зарегистрирован: 11 окт 2004, 19:27
Откуда: Европа, центр, за углом направо.

Re: how to send an e-mail to my gmail address from bat file

Сообщение CdR »

dima писал(а):how that will send mail could not have Java or .NET installed.
This is what I found
http://msmtp.sourceforge.net/documentation.html
Дык cygwin понадобится.
ura
Житель
Сообщения: 915
Зарегистрирован: 09 мар 2003, 22:46

Re: how to send an e-mail to my gmail address from bat file

Сообщение ura »

Ну это что тебе удобнее, скомпилировать свой код и установить .NET framework на XP или использовать open source.
CaptainBlack
Маньяк
Сообщения: 2063
Зарегистрирован: 07 июл 2008, 11:58
Откуда: Россия

Re: how to send an e-mail to my gmail address from bat file

Сообщение CaptainBlack »

dima писал(а):спасибо. они SSL не поддерживают
как я на gmail отправлю без SSL ?
Stunnel can work by either:
Receiving unencrypted data and sending it to an SSL server
...
http://www.stunnel.org/download/binaries.html
Ответить