Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Error when message fails due to no data #2

Open
tomfotherby opened this issue Dec 12, 2013 · 0 comments
Open

No Error when message fails due to no data #2

tomfotherby opened this issue Dec 12, 2013 · 0 comments

Comments

@tomfotherby
Copy link

Here is a test case:

    // Set a valid domain key
    Apostle::setup("valid-key-entered-here");

    // Create a mail instance. Ensure the mail template used doesn't need any data
    $mail = new Mail( "welcome", ["email" => "[email protected]" ] );

    // Send to Apostle.io
    $result = $mail->deliver($failureMsg);

    echo $result ? "all ok" : "Something failed: $failureMsg\n";

It prints "all ok".

There are 3 problems happening:

  1. The message fails to be delivered even though it's valid.
  2. The delivery returns true, but should be false.
  3. The apostle.io web-console shows the wrong delivery failure message.

The apostle.io web-console shows the following reason for failing:

Failed to hydrate template, check your template and data variables match

However this isn't a true error message because my "welcome" template (which I edited from the demo) doesn't have any template variables.

If you thern add any data item, even if the template doesn't need any, the mail will send ok.

    $mail->anythinghere = "any value";

So it seems apostle needs some data, even if not used, before it'll send.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant