Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: EMailSender and SendGrid #30308
    erjon
    Participant

      So Actually i did everything as told and my code is the same as yours i did 2FA on the sendgrid and i confirmed my mobile number too.
      – I also did a Sender Authentication From where to where it needs to go // is this necessecary?
      – I used the SMPT Relay where i made an api key and i used it for the apikey and apikey passowrd // is this correct?
      – When i send a mail through arduino the Intnernet is working because i can see that it makes TCP connection to Sendgrid servers.
      – Im sending from an Outlook Email to a Gmail Email and i dont know if that is right.

      -do you need to pay sendgrid at anypoint because i want to use it for my self and send some email time to time ?

      Hee i will put my Code (i want it to keep it very simple) maybe you can see any mistakes 🙂

      
      #include <Ethernet.h>
      //#define DEFAULT_EMAIL_NETWORK_TYPE_ARDUINO   NETWORK_W5100
      #include <Arduino.h>
      #include <SPI.h>
      #include <EMailSender.h>
       
      // Enter a MAC address for your controller below.
      // Newer Ethernet shields have a MAC address printed on a sticker on the shield
      byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
       
      EMailSender emailSend("apikey", "apikey-psw", "<my sendgrid email>", "smtp.sendgrid.net", 587);
       
      void setup()
      {
          // Open serial communications and wait for port to open:
          Serial.begin(9600);
      //    while (!Serial) {}
       
          Serial.println("Starting!");
       
          // start the Ethernet connection:
          if (Ethernet.begin(mac) == 0) {
            Serial.println("Failed to configure Ethernet using DHCP");
            while(1);
          }
          Serial.print("IP address ");
          Serial.println(Ethernet.localIP());
       
       
          EMailSender::EMailMessage message;
          message.subject = "This is a Test";
          message.message = "Its a Test";
       
          EMailSender::Response resp = emailSend.send("the email i want the maessage to go", message);
       
          Serial.println("Sending status: ");
       
          Serial.println(resp.status);
          Serial.println(resp.code);
          Serial.println(resp.desc);
      }
       
      void loop()
      {
          Serial.begin(9600);
          Serial.println("Starting!");
      }
      

      Thank you because im trying for a Week to get this working 🙂

      • This reply was modified 1 month ago by erjon.
      in reply to: EMailSender and SendGrid #30306
      erjon
      Participant

        Hello,

        Could we go on a Call about this. I dont quite understand the part of the confirmation app on the phone.

        Bye

        in reply to: EMailSender and SendGrid #30257
        erjon
        Participant

          Hey I tried your Code but could you tell me more detailed how did you set up the SendGrid because i think i have everything good exept that.

          thanks

          erjon
          Participant

            How could i save some more memory in the UIPEthernet library?

            Thank you, Erjon.

            erjon
            Participant

              -And im using the EMailSender library and Ethernet library but my Bytes are full and i cant execute the Code. Is there any minimised version for w5100.

              – im trying the method with sendgrid where i put API, Email, etc. But my Bytes are full and i wanted to ask do you have any idea or maybe another library i could use so that my code would be optimized to work when i add more stuff ?

              Thank you,
              Erjon

              erjon
              Participant

                And im using the EMailSender library and Ethernet library but my Bytes are full and i cant execute the Code. Is there any minimised version for w5100.

                Erjon

                erjon
                Participant

                  And are there any firewall rules which i have to look closely or that could cause me problems to not be able to send an email?

                  Erjon

                Viewing 7 posts - 1 through 7 (of 7 total)