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

SendGrid Information #134

Open
BladeSe7en opened this issue Apr 10, 2019 · 1 comment
Open

SendGrid Information #134

BladeSe7en opened this issue Apr 10, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@BladeSe7en
Copy link
Contributor

BladeSe7en commented Apr 10, 2019

SendGrid Setup:
To setup SendGrid you first need to create a SendGrid account at https://sendgrid.com. Once you have an account you need to create two email templates for the app. One template for sending emails to admins and speakers, and another for the speaker email reminder.

This is the template for speaker and admin emails. Once your template is created copy the template ID into your env file and replace the the templateId variable with the process.env.ADMIN_SPEAKER_EMAIL_TEMPLATE in the following functions found in ../server/utils/sendGridEmailer.js
sendEmailToSpeaker
sendEmailToAdmin
sendConfirmCancelToAdmin
sendEmailToNewAdmin

    <head>
      <title>SDJS Meetup</title>
    </head>
    <body>
      <div style='
    align-items: center;
    background-image: linear-gradient(180deg, rgba(24, 132, 195, .64), rgba(24, 132, 195, .64)), url(https://tinyurl.com/ycn372dv);
    background-position: 0px 0px, 0px 38%;
    background-size: auto, cover;
    background-repeat: no-repeat;
    color: white;
    display: flex;
    flex-direction: column;
    margin-left: 0;
    margin-right: 0;'>
      <img className='logo' src='https://tinyurl.com/yb9xzoo5' style="height: 60px;"/>
        </div>
          <p>
              {{emailContent}}
          </p>
    </body>
    </html>
      ```

This is the template for the email reminder. Replace the processs.env.SPEAKER_REMINDER_EMAIL_TEMPLATE  for the templateId variable for the onTime function found in ../server/utils/sendGridEmailer.js
``` <html>
    <head>
      <title>SDJS Meetup</title>
    </head>
    <body style ='background-color: rgba(24, 132, 195, .2)'>
      <div style='
    align-items: center;
    background-image: linear-gradient(180deg, rgba(24, 132, 195, .64), rgba(24, 132, 195, .64)), url(https://tinyurl.com/ycn372dv);
    background-size: auto, cover;
    background-repeat: no-repeat;
    color: white;
    display: flex;
    flex-direction: column;
    margin-left: 0;
    margin-right: 0;'>
      <img className='logo' src='https://tinyurl.com/yb9xzoo5' style="height: 60px;"/>
        </div>
        <h1 style='
        text-align: center; 
        margin-right: auto; 
        margin-left: auto;'
        >{{title}}</h1>
          <p style='
        text-align: center; 
        margin-right: auto; 
        margin-left: auto;'>
           {{emailContent}}
          </p>
                    <div style='display: flex;justify-content:center'>
                      <button style= '
                      {{sdjsBtn}} ? { display: "block" } : { display: "none" }
                      padding: 11px 30px;
                      font-size: 15px;
                      line-height: 16px;
                      text-align: center;
                      text-decoration: none;
                      vertical-align: middle;
                      cursor: pointer;
                      border-style: solid;
                      border-width: 1px;
                      border-radius: 2px;
                      box-sizing: border-box;
                      transition: color .3s,background-color .3s,border-color .3s;
                      color:#f7f7f7;
                      background-color: #1884c3;
                      margin: 30px;'>
                         <a href={{url}} 
                         style='
                         text-decoration: none;
                         color: white'
                         >VISIT SDJS</a>
                      </button>
                 
                    </div>
    </body>
    </html>
    ```
@BladeSe7en BladeSe7en added the bug Something isn't working label Apr 10, 2019
@aerze
Copy link

aerze commented Aug 14, 2019

Needs a Sendgrid admin to up date sendgrid account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants