Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Rainer's Content

There have been 3 items by Rainer (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#34239 SMTP with .NET Micro Framework

Posted by Rainer on 26 August 2012 - 03:37 PM in Netduino Plus 2 (and Netduino Plus 1)

This is to thank you for your invaluable help. I finally got it to work as you suggested. I had to use socket 587. Again, without your support I would never haved gotten it to work. It is very much appreciated.



#34081 SMTP with .NET Micro Framework

Posted by Rainer on 23 August 2012 - 02:29 AM in Netduino Plus 2 (and Netduino Plus 1)

Thanks for your fast response. I added the code that you specified. Now this line works: SMTP_Client Sender = new SMTP_Client(new IntegratedSocket("mail.gmx.com", 587)); However, it wants authentication, which this line does not provide. The other two lines still have the same old problems. SMTP_Client Sender = new SMTP_Client("mail.gmx.com", 587, SMTP_Client.AuthenticationTypes.Login, "oehms@gmx.com", "*******"); SMTP_Client //it complains about not having a constructor with 5 parameters. Sender = new SMTP_Client(new SimpleNETMFSocket("mail.gmx.com", 587), SMTP_Client.AuthenticationTypes.Login, "oehms@gmx.com", "*******"); //it does not know where to reference SimpleNETMFSocket. I changed it to IntegratedNETMFSocket, but that does not work either. Any thoughts? As always, thank you very much for your help.



#34035 SMTP with .NET Micro Framework

Posted by Rainer on 21 August 2012 - 11:30 PM in Netduino Plus 2 (and Netduino Plus 1)

I try to make this work but without success:
the problems is:// Initializes the mail sender class
it does not know 'SimpleNETMFSocket" when I run this.
with the two lines above there are similar problems.
The one above says that it does not have 5 parameters.
on the first one that is commented out it does not know what "IntegratedSocket" is.
Your help is very much appreciated.
Thanks

using System;
//using System.Net;
//using System.Net.Sockets;
//using System.Threading;
//using Microsoft.SPOT;
//using Microsoft.SPOT.Hardware;
//using SecretLabs.NETMF.Hardware;
//using SecretLabs.NETMF.Hardware.NetduinoPlus;

//using Toolbox.NETMF;
using Toolbox.NETMF.NET;
//using Toolbox.NETMF.Hardware;


namespace Mail
{
    public class Program
    {
        public static void Main()
        {
            // By defining the CORRECT! date, mail messages could get a lower spam score in spam filters
            //Utility.SetLocalTime(new DateTime(2011, 10, 16, 20, 43, 0, 0));

            // Defines the sender
            SMTP_Client.MailContact From = new SMTP_Client.MailContact("oehms@gmx.com", "Rainer Oehm");
            // Defines the receiver
            SMTP_Client.MailContact Receiver = new SMTP_Client.MailContact("oehms@yahoo.com", "Rainer Oehm");
            // Defines the mail message
            SMTP_Client.MailMessage Message = new SMTP_Client.MailMessage("Small test result");
            Message.Body = "This mail is sent by a Netduino :-)\r\n";
            Message.Body += "Good day!";

            // Initializes the mail sender class
      //   SMTP_Client Sender = new SMTP_Client(new IntegratedSocket("mail.gmx.com", 25));

       //   SMTP_Client Sender = new SMTP_Client("mail.gmx.com", 587, SMTP_Client.AuthenticationTypes.Login, "oehms@gmx.com", "*******");
    
          SMTP_Client Sender = new SMTP_Client(new SimpleNETMFSocket("mail.gmx.com", 587), SMTP_Client.AuthenticationTypes.Login, "oehms@gmx.com", "*******");



            // Sends the mail
            Sender.Send(Message, From, Receiver);


        }

    }
}




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.