ServiceDesk

 View Only
Expand all | Collapse all

Problem while send email message to a institution

  • 1.  Problem while send email message to a institution

    Posted Jul 13, 2017 06:34 AM
    The users are trying to send message to relatii@meteoromania.ro and catalin.ostroveanu@meteoromania.ro while I am sending to these email addresses. But in permanent, with no response by sender.


  • 2.  RE: Problem while send email message to a institution

    Posted Jul 13, 2017 11:54 AM
    #include <CkMailMan.h>
    #include <CkEmail.h>
    
    void ChilkatSample(void)
        {
        //  The mailman object is used for sending and receiving email.
        CkMailMan mailman;
    
        //  Any string argument automatically begins the 30-day trial.
        bool success = mailman.UnlockComponent("30-day trial");
        if (success != true) {
            std::cout << mailman.lastErrorText() << "\r\n";
            return;
        }
    
        //  Set the SMTP server.
        mailman.put_SmtpHost("smtp.chilkatsoft.com");
    
        //  Set the SMTP login/password (if required)
        mailman.put_SmtpUsername("myUsername");
        mailman.put_SmtpPassword("myPassword");
    
        //  Create a new email object
        CkEmail email;
    
        email.put_Subject("This is a test");
        email.put_Body("This is a test");
        email.put_From("Chilkat Support <support@chilkatsoft.com>");
        success = email.AddTo("Chilkat Admin","admin@chilkatsoft.com");
        //  To add more recipients, call AddTo, AddCC, or AddBcc once per recipient.
    
        //  Call SendEmail to connect to the SMTP server and send.
        //  The connection (i.e. session) to the SMTP server remains
        //  open so that subsequent SendEmail calls may use the
        //  same connection.
        success = mailman.SendEmail(email);
        if (success != true) {
            std::cout << mailman.lastErrorText() << "\r\n";
            return;
        }
    
        //  Some SMTP servers do not actually send the email until
        //  the connection is closed.  In these cases, it is necessary to
        //  call CloseSmtpConnection for the mail to be  sent.
        //  Most SMTP servers send the email immediately, and it is
        //  not required to close the connection.  We'll close it here
        //  for the example:
        success = mailman.CloseSmtpConnection();
        if (success != true) {
            std::cout << "Connection to SMTP server not closed cleanly." << "\r\n";
        }
    
        std::cout << "Mail Sent!" << "\r\n";
    
        }