+ Start a Discussion

sendEmail returns success with no Email

Hi all,
In .NET, I am using v9.0. My sendEmail call is returning success but no Emails are actually being sent. This happens all the time. Can anyone please guide me with this? Thanks.
Can you post your code ?

Sure, Here it is:

I picked it up from the docs.

binding object has been declared and instantiated.

SingleEmailMessage[] messages = new SingleEmailMessage[1];
        messages[0] = new SingleEmailMessage();
        messages[0].bccAddresses = new String[] { "email@email.com", "email@email.com" };
        messages[0].ccAddresses = new String[] { "email@email.com", "email@email.com" };
        messages[0].bccSender = true;
        messages[0].emailPriority = EmailPriority.High;
        messages[0].replyTo = "email@email.com";
        messages[0].saveAsActivity = true;
        messages[0].subject = "This is how you use the sendEmail call.";
        //We can also just use an id for an implicit to address
        messages[0].plainTextBody = "This is the humongous body of the message.";
        String[] toAddresses = { "email@email.com" };
        messages[0].toAddresses = toAddresses;

            SendEmailResult[] result = binding.sendEmail(messages);
        catch (Exception ex)
            throw ex;

Thanks Simon.

but you're not checking the result to see if it wa successful.

It was...I checked it while debugging in Visual Studio.

Any clues? Thanks.

Please log a case with support.