How to fix 'render/2 is undefined' error using Bamboo with PhoenixSend email from localhost running XAMMP in PHP using GMAIL mail serverHow can I schedule code to run every few hours in Elixir or Phoenix framework?Halt a connection after a redirectPhoenix error in deployment: module Connection is not availablePHP Send emails to multiple addresses with amazon SESHow do you post a Map to Phoenix using JSON?How do I load environment variables for a phoenix framework projectPhoenix.Template.UndefinedError when rendering templates - Phoenix 1.3send_download undefined in phoenixPhoenix not loading View module

Can a dragon's breath weapon pass through Leomund's Tiny Hut?

What was the average temperature of space where the Spitzer Satellite Telescope was orbiting?

Interviewing with an unmentioned 9 months of sick leave taken during a job

Arithmetics in LuaLaTeX

Are there any restrictions on how amendment should be related to original law in US Senate?

What was the difference between a Games Console and a Home Computer?

How to find location on Cambridge-Mildenhall railway that still has tracks/rails?

Using SPID in DB Tables (instead of Table Variable)

Is it legal for a supermarket to refuse to sell an adult beer if an adult with them doesn’t have their ID?

Why were these characters absent in Spider-Man: Far From Home?

How can electric field be defined as force per charge, if the charge makes its own, singular electric field?

Is it rude to refer to janitors as 'floor people'?

Random piece of plastic

How to belay quickly ascending top-rope climbers?

Time signature inconsistent

"Je suis petite, moi?", purpose of the "moi"?

Grouping into more groups in one iteration

Difference between c++14 and c++17 using: `*p++ = *p`

How did Jayne know when to shoot?

What would be the safest way to drop thousands of small, hard objects from a typical, high wing, GA airplane?

Locked-up DOS computer beeped on keypress. What mechanism caused that?

Alphanumeric Line and Curve Counting

Increasing muscle power without increasing volume

Term “console” in game consoles



How to fix 'render/2 is undefined' error using Bamboo with Phoenix


Send email from localhost running XAMMP in PHP using GMAIL mail serverHow can I schedule code to run every few hours in Elixir or Phoenix framework?Halt a connection after a redirectPhoenix error in deployment: module Connection is not availablePHP Send emails to multiple addresses with amazon SESHow do you post a Map to Phoenix using JSON?How do I load environment variables for a phoenix framework projectPhoenix.Template.UndefinedError when rendering templates - Phoenix 1.3send_download undefined in phoenixPhoenix not loading View module






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








6















I'm trying to send an email using a html email template with Bamboo (and Amazon SES) for my Phoenix/Elixir application



I've managed to get the email sending successfully using Bamboo's |> text_body(message) method. However I now want to be able to send a html template not just a string so I'm trying to use the render fn https://hexdocs.pm/bamboo/1.1.0/Bamboo.Phoenix.html#render/3 but I'm experiencing the following error: function MyApp.HtmlEmailView.render/2 is undefined (module MyApp.HtmlEmailView is not available). I get no error about my view when I use the text_body fn.



This is my fn:



 def send_test_html_email(to_email_address, subject) do
new_email()
|> from("myemail@gmail.com")
|> to(to_email_address)
|> subject(subject)
|> render("email.html")
end


and this is the example fn from the docs:



 def html_email do
new_email
|> render("html_email.html")
end


I can't see any difference and as I mentioned before, the rest of the fn was working fine with text_body as the last line instead of render.



My expected result is that the email will send without an error. My actual result is the function MyApp.HtmlEmailView.render/2 is undefined (module MyApp.HtmlEmailView is not available) error.










share|improve this question

















  • 2





    Based on that error message, you have no module called MyApp.HtmlEmailView. Can you please double check that there is no typo in the module name, both at the call site and in the definition?

    – Justin Wood
    Mar 26 at 15:21






  • 1





    What is the name of module that implements send_test_html_email function, and did you add line use Bamboo.Phoenix, view: MyApp.HtmlEmailView in that module? Also, do you have MyApp.HtmlEmailView module?

    – Milan Jaric
    Mar 26 at 15:47

















6















I'm trying to send an email using a html email template with Bamboo (and Amazon SES) for my Phoenix/Elixir application



I've managed to get the email sending successfully using Bamboo's |> text_body(message) method. However I now want to be able to send a html template not just a string so I'm trying to use the render fn https://hexdocs.pm/bamboo/1.1.0/Bamboo.Phoenix.html#render/3 but I'm experiencing the following error: function MyApp.HtmlEmailView.render/2 is undefined (module MyApp.HtmlEmailView is not available). I get no error about my view when I use the text_body fn.



This is my fn:



 def send_test_html_email(to_email_address, subject) do
new_email()
|> from("myemail@gmail.com")
|> to(to_email_address)
|> subject(subject)
|> render("email.html")
end


and this is the example fn from the docs:



 def html_email do
new_email
|> render("html_email.html")
end


I can't see any difference and as I mentioned before, the rest of the fn was working fine with text_body as the last line instead of render.



My expected result is that the email will send without an error. My actual result is the function MyApp.HtmlEmailView.render/2 is undefined (module MyApp.HtmlEmailView is not available) error.










share|improve this question

















  • 2





    Based on that error message, you have no module called MyApp.HtmlEmailView. Can you please double check that there is no typo in the module name, both at the call site and in the definition?

    – Justin Wood
    Mar 26 at 15:21






  • 1





    What is the name of module that implements send_test_html_email function, and did you add line use Bamboo.Phoenix, view: MyApp.HtmlEmailView in that module? Also, do you have MyApp.HtmlEmailView module?

    – Milan Jaric
    Mar 26 at 15:47













6












6








6








I'm trying to send an email using a html email template with Bamboo (and Amazon SES) for my Phoenix/Elixir application



I've managed to get the email sending successfully using Bamboo's |> text_body(message) method. However I now want to be able to send a html template not just a string so I'm trying to use the render fn https://hexdocs.pm/bamboo/1.1.0/Bamboo.Phoenix.html#render/3 but I'm experiencing the following error: function MyApp.HtmlEmailView.render/2 is undefined (module MyApp.HtmlEmailView is not available). I get no error about my view when I use the text_body fn.



This is my fn:



 def send_test_html_email(to_email_address, subject) do
new_email()
|> from("myemail@gmail.com")
|> to(to_email_address)
|> subject(subject)
|> render("email.html")
end


and this is the example fn from the docs:



 def html_email do
new_email
|> render("html_email.html")
end


I can't see any difference and as I mentioned before, the rest of the fn was working fine with text_body as the last line instead of render.



My expected result is that the email will send without an error. My actual result is the function MyApp.HtmlEmailView.render/2 is undefined (module MyApp.HtmlEmailView is not available) error.










share|improve this question














I'm trying to send an email using a html email template with Bamboo (and Amazon SES) for my Phoenix/Elixir application



I've managed to get the email sending successfully using Bamboo's |> text_body(message) method. However I now want to be able to send a html template not just a string so I'm trying to use the render fn https://hexdocs.pm/bamboo/1.1.0/Bamboo.Phoenix.html#render/3 but I'm experiencing the following error: function MyApp.HtmlEmailView.render/2 is undefined (module MyApp.HtmlEmailView is not available). I get no error about my view when I use the text_body fn.



This is my fn:



 def send_test_html_email(to_email_address, subject) do
new_email()
|> from("myemail@gmail.com")
|> to(to_email_address)
|> subject(subject)
|> render("email.html")
end


and this is the example fn from the docs:



 def html_email do
new_email
|> render("html_email.html")
end


I can't see any difference and as I mentioned before, the rest of the fn was working fine with text_body as the last line instead of render.



My expected result is that the email will send without an error. My actual result is the function MyApp.HtmlEmailView.render/2 is undefined (module MyApp.HtmlEmailView is not available) error.







email elixir phoenix-framework bamboo






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 9:22









BlenBlen

1187 bronze badges




1187 bronze badges







  • 2





    Based on that error message, you have no module called MyApp.HtmlEmailView. Can you please double check that there is no typo in the module name, both at the call site and in the definition?

    – Justin Wood
    Mar 26 at 15:21






  • 1





    What is the name of module that implements send_test_html_email function, and did you add line use Bamboo.Phoenix, view: MyApp.HtmlEmailView in that module? Also, do you have MyApp.HtmlEmailView module?

    – Milan Jaric
    Mar 26 at 15:47












  • 2





    Based on that error message, you have no module called MyApp.HtmlEmailView. Can you please double check that there is no typo in the module name, both at the call site and in the definition?

    – Justin Wood
    Mar 26 at 15:21






  • 1





    What is the name of module that implements send_test_html_email function, and did you add line use Bamboo.Phoenix, view: MyApp.HtmlEmailView in that module? Also, do you have MyApp.HtmlEmailView module?

    – Milan Jaric
    Mar 26 at 15:47







2




2





Based on that error message, you have no module called MyApp.HtmlEmailView. Can you please double check that there is no typo in the module name, both at the call site and in the definition?

– Justin Wood
Mar 26 at 15:21





Based on that error message, you have no module called MyApp.HtmlEmailView. Can you please double check that there is no typo in the module name, both at the call site and in the definition?

– Justin Wood
Mar 26 at 15:21




1




1





What is the name of module that implements send_test_html_email function, and did you add line use Bamboo.Phoenix, view: MyApp.HtmlEmailView in that module? Also, do you have MyApp.HtmlEmailView module?

– Milan Jaric
Mar 26 at 15:47





What is the name of module that implements send_test_html_email function, and did you add line use Bamboo.Phoenix, view: MyApp.HtmlEmailView in that module? Also, do you have MyApp.HtmlEmailView module?

– Milan Jaric
Mar 26 at 15:47












1 Answer
1






active

oldest

votes


















0














Thanks Justin Wood and Milan Jaric for your comments.



I was using: use Bamboo.Phoenix, view: MyApp.HtmlEmailView at the top of my module however the error was being caused as view: MyApp.HtmlEmailView needed to be view: MyAppWeb.HtmlEmailView. This has resolved the issue. Thank you for your help.






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55353584%2fhow-to-fix-render-2-is-undefined-error-using-bamboo-with-phoenix%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Thanks Justin Wood and Milan Jaric for your comments.



    I was using: use Bamboo.Phoenix, view: MyApp.HtmlEmailView at the top of my module however the error was being caused as view: MyApp.HtmlEmailView needed to be view: MyAppWeb.HtmlEmailView. This has resolved the issue. Thank you for your help.






    share|improve this answer



























      0














      Thanks Justin Wood and Milan Jaric for your comments.



      I was using: use Bamboo.Phoenix, view: MyApp.HtmlEmailView at the top of my module however the error was being caused as view: MyApp.HtmlEmailView needed to be view: MyAppWeb.HtmlEmailView. This has resolved the issue. Thank you for your help.






      share|improve this answer

























        0












        0








        0







        Thanks Justin Wood and Milan Jaric for your comments.



        I was using: use Bamboo.Phoenix, view: MyApp.HtmlEmailView at the top of my module however the error was being caused as view: MyApp.HtmlEmailView needed to be view: MyAppWeb.HtmlEmailView. This has resolved the issue. Thank you for your help.






        share|improve this answer













        Thanks Justin Wood and Milan Jaric for your comments.



        I was using: use Bamboo.Phoenix, view: MyApp.HtmlEmailView at the top of my module however the error was being caused as view: MyApp.HtmlEmailView needed to be view: MyAppWeb.HtmlEmailView. This has resolved the issue. Thank you for your help.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 14:05









        BlenBlen

        1187 bronze badges




        1187 bronze badges


















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55353584%2fhow-to-fix-render-2-is-undefined-error-using-bamboo-with-phoenix%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해