Possible to send e-mail via button on Display T35?

I use the mainboard FEZ Spider.

How can I do this? I have this in my old project:
void setUpNetwork()
{
eth.Interface.Open();
//instructs the Mainboard to use this module for all network communication, and assigns the networking stack to this module.
//This function is only needed if more than one network module is being used simultaneously. If not, this function should not be used.
NetworkInterfaceExtension.AssignNetworkingStackTo(eth.Interface);
eth.Interface.NetworkInterface.EnableStaticIP(ipAddress, subnetMask, gatewayAdress);
}
setUpNetwork is executed in public void ProgramStarted() {…}

Do you mean that in FEZ Config (s. attachment)?

Hi,
this code is an example how the Network can be initialized if your router uses DHCP


using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Presentation.Shapes;
using Microsoft.SPOT.Touch;
using GHI.Premium.Net;
using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace Ethernet_DHCP_Spider
{
    public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
            ethernet_J11D.Interface.CableConnectivityChanged +=new GHI.Premium.Net.EthernetBuiltIn.CableConnectivityChangedEventHandler(Interface_CableConnectivityChanged);
            ethernet_J11D.Interface.NetworkAddressChanged +=new GHI.Premium.Net.NetworkInterfaceExtension.NetworkAddressChangedEventHandler(Interface_NetworkAddressChanged);
            ethernet_J11D.Interface.Open();
            if (NetworkInterfaceExtension.AssignedNetworkInterface == null)
            {
                Debug.Print("NetworkInterfaceExtension.AssignedNetworkInterface == null");
                NetworkInterfaceExtension.AssignNetworkingStackTo(ethernet_J11D.Interface);
            }
            else
            {
                Debug.Print("NetworkInterfaceExtension.AssignedNetworkInterface.IsActivated " + NetworkInterfaceExtension.AssignedNetworkInterface.IsActivated);
                Debug.Print("NetworkInterfaceExtension.AssignedNetworkInterface != null");
                if (NetworkInterfaceExtension.AssignedNetworkInterface.NetworkInterface.NetworkInterfaceType != Microsoft.SPOT.Net.NetworkInformation.NetworkInterfaceType.Ethernet)
                {
                    Debug.Print("NetworkInterfaceExtension.AssignedNetworkInterface.NetworkInterface.NetworkInterfaceType != Microsoft.SPOT.Net.NetworkInformation.NetworkInterfaceType.Ethernet");
                    NetworkInterfaceExtension.AssignNetworkingStackTo(ethernet_J11D.Interface);
                }
            }
            ethernet_J11D.Interface.NetworkInterface.EnableDhcp();
        }

    void  Interface_NetworkAddressChanged(object sender, EventArgs e)
    {
         Debug.Print("Interface_NetworkAddressChanged");
         Debug.Print("New address for the Network Interface ");
         Debug.Print("Is DhCp enabled: " + ethernet_J11D.Interface.NetworkInterface.IsDhcpEnabled);
         Debug.Print("Is DynamicDnsEnabled enabled: " + ethernet_J11D.Interface.NetworkInterface.IsDynamicDnsEnabled);
         Debug.Print("NetworkInterfaceType " + ethernet_J11D.Interface.NetworkInterface.NetworkInterfaceType);
         Debug.Print("Network settings:");
         Debug.Print("IP Address: " + ethernet_J11D.Interface.NetworkInterface.IPAddress);
         Debug.Print("Subnet Mask: " + ethernet_J11D.Interface.NetworkInterface.SubnetMask);
         Debug.Print("Default Gateway: " + ethernet_J11D.Interface.NetworkInterface.GatewayAddress);
         Debug.Print("Number of DNS servers:" + ethernet_J11D.Interface.NetworkInterface.DnsAddresses.Length);
         for (int i = 0; i < ethernet_J11D.Interface.NetworkInterface.DnsAddresses.Length; i++)
              Debug.Print("DNS Server " + i.ToString() + ":" + ethernet_J11D.Interface.NetworkInterface.DnsAddresses[i]);
         Debug.Print("------------------------------------------------------");
}

    void  Interface_CableConnectivityChanged(object sender, GHI.Premium.Net.EthernetBuiltIn.CableConnectivityEventArgs e)
    {
 	    //throw new NotImplementedException();
    }

    }
} 

Thank you very much RoSchmi. It’s very helpful what you posted.
But now I don’t get error but the e-mail is not sent: The debug window is:
Program Started
NetworkInterfaceExtension.AssignedNetworkInterface.IsActivated True
NetworkInterfaceExtension.AssignedNetworkInterface != null
Interface_NetworkAddressChanged
New address for the Network Interface
Is DhCp enabled: True
Is DynamicDnsEnabled enabled: False
NetworkInterfaceType 6
Network settings:
IP Address: 192.168.2.106
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.2.1
Number of DNS servers:2
DNS Server 0:192.168.2.1
DNS Server 1:192.168.2.1

The thread ‘’ (0x3) has exited with code 0 (0x0).
Button Pressed!
587
smpt.gmail.com
System.Net.IPHostEntry
80.156.86.78:587

The program starts. After I press send button, I see on the debug window:
System.Net.IPHostEntry
80.156.86.78:587

I have entered the debug.print in every if-clause in source.cs:


public class SmtpClient
{
    private string _SmtpServerName = null;
    private int _Port = 0;
    private enum SmtpState
    {
        NotConnected,
        DomainAccepting,
        MailFromAccepting,
        RecipientAccepting,
        DataCommandAccepting,
        MessageAccepting,
        ConnectionClosing
    };

    SmtpState state;

    public SmtpClient(string SmtpServerName, Int32 Port)
    {
        if (Port < 0)
            throw new ArgumentOutOfRangeException();
        _SmtpServerName = SmtpServerName;
        _Port = Port;
        Debug.Print(_Port.ToString());
        Debug.Print(_SmtpServerName.ToString());
    }

    public void Send(string from, string recipient, string subject, string body, 
        bool authenticate = false, string username = "", string password = "")
    {
        if (username != "" && password != "")
        { 
            System.Text.Encoding encoding = new System.Text.UTF8Encoding();
            username = Convert.ToBase64String(encoding.GetBytes(username));
            password = Convert.ToBase64String(encoding.GetBytes(password));
        }
        state = SmtpState.NotConnected;
        /* Connect to the Server*/
        // Figure out the Server IP Address
        IPHostEntry SmtpServerHostEntry = Dns.GetHostEntry(_SmtpServerName);
        Debug.Print(SmtpServerHostEntry.ToString());
        IPEndPoint SmtpServerEndPoint = new IPEndPoint(SmtpServerHostEntry.AddressList[0],
        _Port);
        Debug.Print(SmtpServerEndPoint.ToString());
        // Establish the connection with SMTP Server
        Socket SmtpConnection = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
        ProtocolType.Tcp);
        SmtpConnection.Connect(SmtpServerEndPoint);
        String ResponseStr = null;
        while (SmtpConnection.Poll(-1, SelectMode.SelectRead))
        {
            byte[] ReceiveBuffer = new byte[SmtpConnection.Available];
            SmtpConnection.Receive(ReceiveBuffer, ReceiveBuffer.Length, SocketFlags.None);
            // The first 3 bytes hold the message number which is enough for us.
            ResponseStr = new String(Encoding.UTF8.GetChars(ReceiveBuffer), 0, 3);
            int Response = Int16.Parse(ResponseStr);
            switch (state)
            {
                case SmtpState.NotConnected:
                    if (Response == 220) // Domain service ready.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("HELO " +
                            from.Split(new char[] { '@ ' })[1] + "\r\n"));
                        if (authenticate && username != "" && password != "")
                        {
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes("AUTH LOGIN\r\n"));
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes(username + "\r\n"));
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes(password + "\r\n"));
                            Thread.Sleep(300);                        
                        }
                        state = SmtpState.DomainAccepting;
                        Debug.Print("Response==220");
                    }
                    break;
                case SmtpState.DomainAccepting:
                    if (Response == 250) // auth successful (if authentication enabled).
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("MAIL FROM:<" + from +
                        ">\r\n"));
                        state = SmtpState.MailFromAccepting;
                        Debug.Print("DomainAccepting: Response==250");
                    }
                    break;
                case SmtpState.MailFromAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("RCPT TO:<" + recipient
                        + ">\r\n"));
                        state = SmtpState.RecipientAccepting;
                        Debug.Print("MailFromAccepting: Response==250");
                    }
                    break;
                case SmtpState.RecipientAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("DATA\r\n"));
                        state = SmtpState.DataCommandAccepting;
                        Debug.Print("RecipientAccepting: Response==250");
                    }
                    break;
                case SmtpState.DataCommandAccepting:
                    if (Response == 354) //Start mail input; end with <CRLF>.<CRLF>.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("Subject: " + subject +
                        "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("From: " + from +
                        "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("To: " + recipient +
                        "\r\n\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes(body + "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes(".\r\n"));
                        state = SmtpState.MessageAccepting;
                        Debug.Print("DataCommandAccepting: Response==354");
                    }
                    break;
                case SmtpState.MessageAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("QUIT\r\n"));
                        state = SmtpState.ConnectionClosing;
                        Debug.Print("MessageAccepting: Response==250");
                    }
                    break;
                case SmtpState.ConnectionClosing:
                    if (Response == 221) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Close();
                        Debug.Print("ConnectionClosing: Response==221");
                        return;
                    }
                    break;
            }
        }
        SmtpConnection.Close();
        throw new Exception("SMTP connection Timeout");
    }
}

GMail requires you to use SSL. Your code doesn’t use that. Use a different ISP email server.

Which one would you recommend?

the one you have credentials for.

I also have a web account and find the attached image in the internet (in settings).


int SMTP_PORT = 587;
            string MAIL_SERVER = "smtp.web.de"; 
            string SENDER_ADDRESS = "myusername@ web.de"; 
            string RECIPIENT_ADDRESS = "recipient@ gmail.com"; 
            string SUBJECT = "Your Subject"; 
            string BODY = "This is a test Message"; 
            string SMTP_USERNAME = "my_login_name"; 
            string SMTP_PASSWORD = "my_password";

Is that not right??

587 = secure. You can’t use SSL/TLS with this code. Since I only speak/read English, I can’t tell for sure if there’s a “use only secure” option on your screenshot, but you need to use a SMTP server that permits the use of unencrypted/unsecured SMTP transfer, usually to port 25.

read a little bit about web.de
seems to work only with ssl/tsl
so you need another mail provider :cry:

Now I have created a new account in outlook which allows smtp with port 25.
My output window delivers on press on the button first:
Button Pressed!
25
smtp-mail.outlook.com
System.Net.IPHostEntry
65.55.96.11:25
Response==220
DomainAccepting: Response==250
After a few seconds I get #### Exception System.ArgumentNullException - 0x00000000 (5) ####.

public void Send(string from, string recipient, string subject, string body, 
        bool authenticate = false, string username = "", string password = "")
    {
        if (username != "" && password != "")
        { 
            System.Text.Encoding encoding = new System.Text.UTF8Encoding();
            username = Convert.ToBase64String(encoding.GetBytes(username));
            password = Convert.ToBase64String(encoding.GetBytes(password));
        }
        state = SmtpState.NotConnected;
        /* Connect to the Server*/
        // Figure out the Server IP Address
        IPHostEntry SmtpServerHostEntry = Dns.GetHostEntry(_SmtpServerName);
        Debug.Print(SmtpServerHostEntry.ToString());
        IPEndPoint SmtpServerEndPoint = new IPEndPoint(SmtpServerHostEntry.AddressList[0],
        _Port);
        Debug.Print(SmtpServerEndPoint.ToString());
        // Establish the connection with SMTP Server
        Socket SmtpConnection = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
        ProtocolType.Tcp);
        SmtpConnection.Connect(SmtpServerEndPoint);
        String ResponseStr = null;
        while (SmtpConnection.Poll(-1, SelectMode.SelectRead))
        {
            byte[] ReceiveBuffer = new byte[SmtpConnection.Available];
            SmtpConnection.Receive(ReceiveBuffer, ReceiveBuffer.Length, SocketFlags.None);
            // The first 3 bytes hold the message number which is enough for us.
            ResponseStr = new String(Encoding.UTF8.GetChars(ReceiveBuffer), 0, 3);
            int Response = Int16.Parse(ResponseStr);
            switch (state)
            {
                case SmtpState.NotConnected:
                    if (Response == 220) // Domain service ready.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("HELO " +
                            from.Split(new char[] { '@ ' })[1] + "\r\n"));
                        if (authenticate && username != "" && password != "")
                        {
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes("AUTH LOGIN\r\n"));
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes(username + "\r\n"));
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes(password + "\r\n"));
                            Thread.Sleep(300);                        
                        }
                        state = SmtpState.DomainAccepting;
                        Debug.Print("Response==220");
                    }
                    break;
                case SmtpState.DomainAccepting:
                    if (Response == 250) // auth successful (if authentication enabled).
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("MAIL FROM:<" + from +
                        ">\r\n"));
                        state = SmtpState.MailFromAccepting;
                        Debug.Print("DomainAccepting: Response==250");
                    }
                    break;
                case SmtpState.MailFromAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("RCPT TO:<" + recipient
                        + ">\r\n"));
                        state = SmtpState.RecipientAccepting;
                        Debug.Print("MailFromAccepting: Response==250");
                    }
                    break;
                case SmtpState.RecipientAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("DATA\r\n"));
                        state = SmtpState.DataCommandAccepting;
                        Debug.Print("RecipientAccepting: Response==250");
                    }
                    break;
                case SmtpState.DataCommandAccepting:
                    if (Response == 354) //Start mail input; end with <CRLF>.<CRLF>.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("Subject: " + subject +
                        "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("From: " + from +
                        "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("To: " + recipient +
                        "\r\n\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes(body + "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes(".\r\n"));
                        state = SmtpState.MessageAccepting;
                        Debug.Print("DataCommandAccepting: Response==354");
                    }
                    break;
                case SmtpState.MessageAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("QUIT\r\n"));
                        state = SmtpState.ConnectionClosing;
                        Debug.Print("MessageAccepting: Response==250");
                    }
                    break;
                case SmtpState.ConnectionClosing:
                    if (Response == 221) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Close();
                        Debug.Print("ConnectionClosing: Response==221");
                        return;
                    }
                    break;
            }
        }
        SmtpConnection.Close();
        throw new Exception("SMTP connection Timeout");
    }

The exception is thrown in


Do you know what can be the reason??

My event_handler code is:

```cs
private void Button_PressEvent(object sender)
        {
            Debug.Print("Button Pressed!");
            SmtpClient mySmtp;
            int SMTP_PORT = 25;
            string MAIL_SERVER = "smtp-mail.outlook.com";
            string SENDER_ADDRESS = "hochschule_karlsruhe@ outlook.de";
            string RECIPIENT_ADDRESS = "hochschule_karlsruhe@ outlook.de"; 
            string SUBJECT = "Your Subject"; 
            string BODY = "This is a test Message";
            string SMTP_USERNAME = "hochschule_karlsruhe@ outlook.de"; 
            string SMTP_PASSWORD = "test1234"; 
            mySmtp = new SmtpClient(MAIL_SERVER, SMTP_PORT);             
            // Usage for anonymous (unauthenticated) Send...default parameter values will be used for auth params             
            //mySmtp.Send(SENDER_ADDRESS, RECIPIENT_ADDRESS, SUBJECT, BODY);             
            // Usage for authenticated Send - SMTP username and password will be base64 encoded by the             
            //   Send method.             
            mySmtp.Send(SENDER_ADDRESS, RECIPIENT_ADDRESS, SUBJECT, BODY, true, SMTP_USERNAME, SMTP_PASSWORD);
            Debug.Print("Send erreicht");
        }

sigh. If the exception is in parsing the response string, what is the string???

2 Likes

ResponseStr= 220
Response==220
ResponseStr= 250
DomainAccepting: Response==250
ResponseStr= 530
ResponseStr= 530
ResponseStr= 530
ResponseStr= 530
ResponseStr=
#### Exception System.ArgumentNullException - 0x00000000 (5) ####
#### Message:
#### System.Int16::Parse [IP: 0006] ####
#### SmtpClient::Send [IP: 00b0] ####
#### Button_Internet_Test.Program::Button_PressEvent [IP: 0042] ####
#### GHIElectronics.NETMF.Glide.UI.Button::TriggerPressEvent [IP: 000e] ####
#### GHIElectronics.NETMF.Glide.Display.DisplayObjectContainer::OnTouchDown [IP: 0035] ####
#### GHIElectronics.NETMF.Glide.Display.Window::TouchDownEvent [IP: 002e] ####
#### GHIElectronics.NETMF.Glide.TouchEventHandler::Invoke [IP: 0000] ####
#### GHIElectronics.NETMF.Glide.GlideTouch::RaiseTouchDownEvent [IP: 0008] ####
#### GHIElectronics.NETMF.Glide.GlideTouch+TouchConnection::OnEvent [IP: 007f] ####
#### Microsoft.SPOT.EventSink::ProcessEvent [IP: 0023] ####
#### Microsoft.SPOT.EventSink::EventDispatchCallback [IP: 0014] ####
A first chance exception of type ‘System.ArgumentNullException’ occurred in mscorlib.dll
An unhandled exception of type ‘System.ArgumentNullException’ occurred in mscorlib.dll


while (SmtpConnection.Poll(-1, SelectMode.SelectRead))
        {
            byte[] ReceiveBuffer = new byte[SmtpConnection.Available];
            SmtpConnection.Receive(ReceiveBuffer, ReceiveBuffer.Length, SocketFlags.None);
            // The first 3 bytes hold the message number which is enough for us.
            ResponseStr = new String(Encoding.UTF8.GetChars(ReceiveBuffer), 0, 3);
            Debug.Print("ResponseStr= " + ResponseStr);
            int Response = Int16.Parse(ResponseStr);
            switch (state)
            {
                case SmtpState.NotConnected:
                    if (Response == 220) // Domain service ready.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("HELO " +
                            from.Split(new char[] { '@ ' })[1] + "\r\n"));
                        if (authenticate && username != "" && password != "")
                        {
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes("AUTH LOGIN\r\n"));
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes(username + "\r\n"));
                            Thread.Sleep(300);
                            SmtpConnection.Send(Encoding.UTF8.GetBytes(password + "\r\n"));
                            Thread.Sleep(300);                        
                        }
                        state = SmtpState.DomainAccepting;
                        Debug.Print("Response==220");
                    }
                    break;
                case SmtpState.DomainAccepting:
                    if (Response == 250) // auth successful (if authentication enabled).
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("MAIL FROM:<" + from +
                        ">\r\n"));
                        state = SmtpState.MailFromAccepting;
                        Debug.Print("DomainAccepting: Response==250");
                    }
                    break;
                case SmtpState.MailFromAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("RCPT TO:<" + recipient
                        + ">\r\n"));
                        state = SmtpState.RecipientAccepting;
                        Debug.Print("MailFromAccepting: Response==250");
                    }
                    break;
                case SmtpState.RecipientAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("DATA\r\n"));
                        state = SmtpState.DataCommandAccepting;
                        Debug.Print("RecipientAccepting: Response==250");
                    }
                    break;
                case SmtpState.DataCommandAccepting:
                    if (Response == 354) //Start mail input; end with <CRLF>.<CRLF>.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("Subject: " + subject +
                        "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("From: " + from +
                        "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("To: " + recipient +
                        "\r\n\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes(body + "\r\n"));
                        SmtpConnection.Send(Encoding.UTF8.GetBytes(".\r\n"));
                        state = SmtpState.MessageAccepting;
                        Debug.Print("DataCommandAccepting: Response==354");
                    }
                    break;
                case SmtpState.MessageAccepting:
                    if (Response == 250) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Send(Encoding.UTF8.GetBytes("QUIT\r\n"));
                        state = SmtpState.ConnectionClosing;
                        Debug.Print("MessageAccepting: Response==250");
                    }
                    break;
                case SmtpState.ConnectionClosing:
                    if (Response == 221) // Requested mail action okay, completed.
                    {
                        SmtpConnection.Close();
                        Debug.Print("ConnectionClosing: Response==221");
                        return;
                    }
                    break;
            }
        }
        SmtpConnection.Close();
        throw new Exception("SMTP connection Timeout");
    }

What does while (SmtpConnection.Poll(-1, SelectMode.SelectRead))??

ResponseStr is null or empty. Check for that before doing Parse.

and then?? If response_str = null I still can’t send e-mail…

530 is an error research it.

As Architect pointed out, the 530 in your response string is an error and your clue to the fault. Do a search on SMTP 530 and you’ll see what’s wrong.

Hint: the host hung up on you because you were ignoring the error.

I think the reason is the encrypted send of e-mails but I couldn’t find e-mail server that sends unencrypted.

@ SB - Display the whole response string not just the first 3 chars. It might have more information about the error.

@ SB -
if you can send E-mails with e.g. MS Office Outlook to the E-Mail server you could install Wireshark to analyse the network messages and to compare the differences between MS Outlook and your FEZ E-Mail Client.