Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

feat: create mailer #63

Merged
merged 20 commits into from
Nov 25, 2021
Merged

feat: create mailer #63

merged 20 commits into from
Nov 25, 2021

Conversation

mimoham24
Copy link
Contributor

@mimoham24 mimoham24 commented Oct 13, 2021

Overview

What I've done

What I haven't done

How I tested

Unit testing:

  • encodContent()
  • encodeMessage()

MailHog:

  • input
SendMail([]gateway.Contact{{
		Email: "tester@test.com",
		Name:  "tester",
	}},"test","plain content goes here","<p>html content goes here</p>") 
  • output source:
Content-Type: multipart/mixed; boundary=48501ac417e0fccf04f546f00de8f5728457ad1be43f2106d136b35b2ecb
MIME-Version: 1.0
Message-ID: v3BwjTuUoxQzvdppEmvYP1L10M59yKDe-7vEabzM6w8=@mailhog.example
Received: from localhost by mailhog.example (MailHog)
          id v3BwjTuUoxQzvdppEmvYP1L10M59yKDe-7vEabzM6w8=@mailhog.example; Mon, 22 Nov 2021 07:29:18 +0300
Return-Path: <sender@reearth.test>
Subject: test
To: tester@test.com

 --e2c0c686e7aa10e44c6e754ca61d286b4193e094d3ca041c739922c518f3
Content-Type: multipart/related; boundary=RELATED-e2c0c686e7aa10e44c6e754ca61d286b4193e094d3ca041c739922c518f3

--RELATED-e2c0c686e7aa10e44c6e754ca61d286b4193e094d3ca041c739922c518f3
Content-Type: multipart/alternative; boundary=ALTERNATIVE-RELATED-e2c0c686e7aa10e44c6e754ca61d286b4193e094d3ca041c739922c518f3

--ALTERNATIVE-RELATED-e2c0c686e7aa10e44c6e754ca61d286b4193e094d3ca041c7
Content-Type: text/plain

plain content goes here\r\n\r\n
--ALTERNATIVE-RELATED-e2c0c686e7aa10e44c6e754ca61d286b4193e094d3ca041c7
Content-Type: text/html

<p>html content goes here</p>\r\n
--ALTERNATIVE-RELATED-e2c0c686e7aa10e44c6e754ca61d286b4193e094d3ca041c7--

--RELATED-e2c0c686e7aa10e44c6e754ca61d286b4193e094d3ca041c739922c518f3--

Which point I want you to review particularly

Memo

@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

❗ No coverage uploaded for pull request base (feat/authentication-system@482518f). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                      Coverage Diff                      @@
##             feat/authentication-system      #63   +/-   ##
=============================================================
  Coverage                              ?   16.50%           
=============================================================
  Files                                 ?      249           
  Lines                                 ?    43270           
  Branches                              ?        0           
=============================================================
  Hits                                  ?     7141           
  Misses                                ?    35114           
  Partials                              ?     1015           

@mimoham24 mimoham24 changed the title feat: create mailer (go-mailer is used) feat: create mailer Oct 27, 2021
internal/app/config.go Outdated Show resolved Hide resolved
internal/usecase/gateway/mailer.go Outdated Show resolved Hide resolved
@mimoham24 mimoham24 requested a review from rot1024 October 31, 2021 21:34
Copy link
Member

@rot1024 rot1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/app/config.go Outdated Show resolved Hide resolved
internal/app/config.go Outdated Show resolved Hide resolved
internal/app/repo.go Outdated Show resolved Hide resolved
internal/infrastructure/mailer/smtp.go Outdated Show resolved Hide resolved
internal/infrastructure/mailer/smtp.go Outdated Show resolved Hide resolved
internal/infrastructure/mailer/smtp.go Outdated Show resolved Hide resolved
internal/infrastructure/mailer/smtp.go Outdated Show resolved Hide resolved
@rot1024
Copy link
Member

rot1024 commented Nov 4, 2021

Still draft?

@mimoham24 mimoham24 marked this pull request as ready for review November 4, 2021 16:20
@mimoham24 mimoham24 requested a review from rot1024 November 9, 2021 10:46
Copy link
Member

@rot1024 rot1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codes seem ok, and do test whether smtp works well with https://github.com/mailhog/MailHog

@mimoham24 mimoham24 requested a review from rot1024 November 22, 2021 04:41
@mimoham24 mimoham24 merged commit 2632fe9 into feat/authentication-system Nov 25, 2021
@mimoham24 mimoham24 deleted the auth/mailer branch November 25, 2021 09:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants