Skip to content

Commit

Permalink
Revert "chore: update mailkit"
Browse files Browse the repository at this point in the history
This reverts commit f5d10ee.
  • Loading branch information
cowienduckie committed Dec 3, 2023
1 parent f5d10ee commit 2249532
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
15 changes: 13 additions & 2 deletions k8s/charts/communication-api/templates/external-email-sender.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ apiVersion: v1
metadata:
name: external-email-sender
spec:
type: ExternalName
externalName: {{ .Values.externalEmailSender.host }}
ports:
- port: 587
targetPort: 587
---
kind: Endpoints
apiVersion: v1
metadata:
name: external-email-sender
subsets:
- addresses:
- ip: 198.54.122.135
ports:
- port: 587
{{- end }}
4 changes: 2 additions & 2 deletions k8s/charts/communication-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ingress:

externalEmailSender:
enabled: true
host: 'mail.privateemail.com'
host: mail.privateemail.com

resources:
limits:
Expand Down Expand Up @@ -73,7 +73,7 @@ env:
value: http://identity-api:15101

- name: MailKit__SmtpHost
value: external-email-sender
value: mail.privateemail.com
- name: MailKit__SmtpPort
value: '587'
- name: MailKit__Username
Expand Down
2 changes: 1 addition & 1 deletion src/BuildingBlocks/Email.MailKit/MailKitSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public MailKitSender(SmtpClient smtpClient, IOptionsMonitor<MailKitOptions> mail

public async Task SendAsync(EmailData email, CancellationToken cancellationToken)
{
await _smtpClient.ConnectAsync(_mailkitOptions.SmtpHost, _mailkitOptions.Port, false, cancellationToken);
await _smtpClient.ConnectAsync(_mailkitOptions.SmtpHost, _mailkitOptions.Port, true, cancellationToken);

if (!string.IsNullOrEmpty(_mailkitOptions.Username))
{
Expand Down

0 comments on commit 2249532

Please sign in to comment.