smtp

Connecting to smtp.live.com with the TcpClient class

北慕城南 提交于 2019-12-03 15:40:44
I'm trying to connect to smtp.live.com using the TcpClient class. There is a wonderful example of connecting to Gmail here: Testing SMTP server is running via C# Unfortunately, when updating this to work with smtp.live.com, I'm getting an "IOException: The handshake failed due to an unexpected packet format" when the AuthenticateAsClient method is called. How can I work around this? class Program { static void Main(string[] args) { using (var client = new TcpClient()) { var server = "smtp.live.com"; var port = 25; client.Connect(server, port); using (var stream = client.GetStream()) using (var

Sending email from inside unity3d

瘦欲@ 提交于 2019-12-03 15:33:52
I am trying to send an email from inside unity on smartphones using the SmtpClient class. I have achieved this quite simple task on iOS but the exact same code does not work on android. Here's the code: private IEnumerator sendAutoMail (string textBody,string title) { MailMessage mail = new MailMessage(); mail.From = new MailAddress(sender); mail.To.Add(receiver); mail.Subject = "R4UL " + title; mail.Body = textBody; Debug.Log("Connecting to SMTP server"); SmtpClient smtpServer = new SmtpClient("smtp.gmail.com"); smtpServer.Port = 587; smtpServer.Credentials = new System.Net.NetworkCredential

sendmailR: Submit encoded message to local SMTP server

╄→尐↘猪︶ㄣ 提交于 2019-12-03 15:28:06
I need your help in order to send email message that includes text in Greek, from within R, using the function sendmail {sendmailR}. I tried using the function iconv , like that but it didn't work subject <- iconv("text in greek", to = "CP1253") sendmail(from, to, subject, msg, control=list(smtpServer="blabla")) The mail arrives immediately but the greek characters are unreadable. Any ideas? EDIT Another question that came up: The second argument to accepts one recipient. What if want to send it to more than one? (I think 'll try sapply ing the sendmail function to a vector of recipients) - Ok

How do I use Gmail SMTP with port 587 on AWS EC2?

时光怂恿深爱的人放手 提交于 2019-12-03 14:42:36
I have used Gmail SMTP service with port 587 on the local server and it's working fine. But it's not working on AWS EC2 instance. So I added SMTP rules on EC2 instance security inbound rules see below image but SMTP port can not be editable. Now the issue is if your domain does not configure secured connections. Gmail does not offer port 25 in an unsecured connection. So, there is any way to use SMTP on unsecured connection with 25 port or any other way. I have fixed issue as of now for a development server. Please, not it's not the correct way to a production site. For sending an email from

Writing a simple email server

血红的双手。 提交于 2019-12-03 14:13:28
What would be a good starting point for me to learn about creating an email server? Basically, what I want to do is have a server (such as foo.com) recieving mail for me so if I send an email to (blah@foo.com) it will dump the contents of the email into /mail/blah/subject and then send it off to my REAL email account. I'm looking to do this as a programming exercise, so links to RFCs, etc. would be nice. Reinventing the wheel is a good way to learn about wheels. EDIT: Feel free to retag this appropriately. Edit : I provided some headings and divided RFCs by topic. I hope it's more accessible

CSS on Email

雨燕双飞 提交于 2019-12-03 13:58:19
Has anyone found a good way of embeding CSS in a programatically produced email. The best way I have found is to put the style code into a resource file and call it into the code. An emample would be Dim objBuilder objBuilder = New StringBuilder objBuilder.Append(Resources.SystemEmail.CSSStyle) objBuilder.Append("My Styled Email") Dim _Body As String = objBuilder.ToString() This would build the body of the email Is there any way to make a template file for an email or a better way to call a style sheet into one. The code in my .resx file would be <STYLE TYPE="text/css"> <!-- body { font-family

How to validate SMTP server

你说的曾经没有我的故事 提交于 2019-12-03 13:46:28
问题 I am working on a project where I have to validate the given SMTP server i.e in a textbox user will provide the detail and then he will click on a test button. I want to check whether the server entered by the user is an Smtp Server or not? Any Idea?? 回答1: Attempt to connect to the SMTP port, and ensure you get a line back from it that starts with "220 " and contains the letters "SMTP". A typical example response would be: 220 prod.monadic.cynic.net ESMTP Postfix (2.5.5) Then be polite and

Sending Asp.Net email through gmail

跟風遠走 提交于 2019-12-03 13:26:58
问题 I am trying to send an email via GMail from ASP.Net using the code and config below. Unfortunatly it doesn't seem to be working and it also isn't throwing an error message. There is nothing in the server logs or the mail IIS mail folders, I even checked the trash of the from address to see if the mail ended up there. Any help would be really appreciated. C# Section public void SendFeedback() { string emailFrom = this.Email.Text; MailMessage message = new MailMessage(); // here is an important

SSL support for smtp.live.com and TIdSmtp (Indy, Delphi)

寵の児 提交于 2019-12-03 13:10:12
I am trying to connect to smtp.live.com to send emails (live.com supports free pop3/smtp since 2009 apparently but this is totally news for me). Here is what happens when I try to connect to smtp.live.com port 587: Method sslvSSLv2 - timeout (obviously the server does not support SSL2) Method sslvSSLv3 - Error connecting with SSL. - error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number Method sslvSSLv23 - Error connecting with SSL. - error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol Method sslvTLSv1 - Error connecting with SSL. - error:1408F10B:SSL routines:SSL3

Using tls-extra for simple smtp

青春壹個敷衍的年華 提交于 2019-12-03 12:37:19
I am trying to write a simple script to send a mail via my gmail account. But I am a beginner so it is not that simple. I tryed google but exept for hackage, there is no help or examples at all. The problem is that I did not find the way to use tls-extra(or tls) to initiate the STARTTLS exchange. Ok, here is the code: import Network import Network.TLS.Extra import System.IO import Text.Printf server = "smtp.gmail.com" port = 25 --that has to chage, I think forever a = a >> forever a main = test1 write :: Handle -> String -> IO () write h s = do hPrintf h "%s\r\n" s printf "> %s\n" s listen ::