diff --git a/api/src/auth/auth.service.ts b/api/src/auth/auth.service.ts index b43872c..fb3cb6a 100644 --- a/api/src/auth/auth.service.ts +++ b/api/src/auth/auth.service.ts @@ -71,6 +71,7 @@ export class AuthService { subject: 'Welcome to TextBee - Lets get started!', template: 'welcome-1', context: { name: user.name }, + from: 'vernu vernu@textbee.dev', }) } @@ -124,6 +125,7 @@ export class AuthService { subject: 'Welcome to TextBee - Lets get started!', template: 'welcome-1', context: { name: user.name }, + from: 'vernu vernu@textbee.dev', }) const payload = { email: user.email, sub: user._id } diff --git a/api/src/mail/mail.service.ts b/api/src/mail/mail.service.ts index a7de98f..fb531c7 100644 --- a/api/src/mail/mail.service.ts +++ b/api/src/mail/mail.service.ts @@ -1,17 +1,21 @@ -import { MailerService } from '@nest-modules/mailer' +import { ISendMailOptions, MailerService } from '@nest-modules/mailer' import { Injectable } from '@nestjs/common' @Injectable() export class MailService { constructor(private readonly mailerService: MailerService) {} - async sendEmail({ to, subject, html }) { - const sendMailOptions = { + async sendEmail({ to, subject, html, from }) { + const sendMailOptions: ISendMailOptions = { to, subject, html, } + if (from) { + sendMailOptions['from'] = from + } + if (process.env.MAIL_REPLY_TO) { sendMailOptions['replyTo'] = process.env.MAIL_REPLY_TO } @@ -22,12 +26,17 @@ export class MailService { } } - async sendEmailFromTemplate({ to, subject, template, context }) { - const sendMailOptions = { + async sendEmailFromTemplate({ to, subject, template, context, from }: ISendMailOptions) { + const sendMailOptions: ISendMailOptions = { to, subject, template, context, + from, + } + + if (from) { + sendMailOptions['from'] = from } if (process.env.MAIL_REPLY_TO) { diff --git a/api/src/mail/templates/welcome-1.hbs b/api/src/mail/templates/welcome-1.hbs index e41a42c..4b019c9 100644 --- a/api/src/mail/templates/welcome-1.hbs +++ b/api/src/mail/templates/welcome-1.hbs @@ -1,27 +1,31 @@

Hi {{name}},

-Welcome to TextBee! We’re excited to have you on board.

+My name is Vernu, and I'm the founder of TextBee. +

-TextBee is your go-to solution for seamless SMS gateway integration, designed to help you manage your messaging needs efficiently and effectively. Whether you’re a developer, marketer, or business owner, our platform is built to scale with your needs.

+I built TextBee to help you with your messaging needs. be it sending OTP, notifications, or automated messaging workflows for your business. +

-Here’s how you can get started:

+Here are few tips to get you started:

- 1. Explore our Documentation: Learn how to integrate TextBee with your existing systems in the github readme
- 2. Support Our Work: Consider supporting us on Patreon to help us continue improving TextBee.
- 3. Star our repo on Github
- 3. Join the Community on discord: Connect with other users and developers, ask questions, and share ideas on our Community Forum.
- -
-If you have any questions or need assistance, feel free to reach out to our support team at textbee.dev@gmail.com.

- -Thank you for choosing TextBee! We look forward to helping you streamline your messaging.

+

    +
  1. Explore our Documentation: Learn how to integrate TextBee with your existing systems in the github readme
  2. +
  3. Join the Community on Discord and get help: Connect with other users and developers, ask questions, and share ideas on our Community Forum.
  4. +
  5. Support Our Work: Consider supporting us on Patreon to help us continue improving TextBee.
  6. +
  7. Star our repo on Github
  8. +

    +
    +P.S. Why did you choose TextBee? What feedback do you have?
    +Do you have any questions or need assistance?
    +Feel free to reach out to our support team at contact@textbee.dev.
    +we read and respond to all emails as quickly as possible.


    -Best regards,
    -Vernu
    -
    +Cheers,
    +Vernu, founder
    +
    TextBee.dev