# Transactional email for my own website

**URL:** <https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653>\
**Category:** uncategorized\
**Created:** [November 9, 2019, 4:30pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653 "2019-11-09T16:30:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danystatic](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/danystatic/32/1288_2.png) [@Danystatic](https://discourse.mailinabox.email/u/Danystatic)\
**Post date:** [November 9, 2019, 4:30pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/1 "2019-11-09T16:30:24Z")

</div>

What do I need to use a mailinabox server , in order to have my php backend to automatically send an email to a new signed up user.

I mean after I setup mailinabox successfully.  
I want to send automatically with my own created backend an email. I have my backend already working with mail gun. However I do wish to use my own mailinabox server.

I understand some people recommend sendgrid, but if I can code this myself, why would I use mailgun, or sendgrid? Isn’t that’s what mailinabox is for?

I want to know how can I configure the smtp settings into my laravel backend?  
Is it technically possible?  
Any suggestions or comments?

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [November 9, 2019, 4:46pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/2 "2019-11-09T16:46:33Z")

</div>

> [@Danystatic](#):
>
> Is it technically possible?

Absolutely.

> [@Danystatic](#):
>
> I want to know how can I configure the smtp settings into my laravel backend?

I do not know Laravel, but you can add the SMTP server details … somehow. Check Laravel docs.

ETA\* - What you need is in the Swiftmailer library. Hopefully that gives you a clue where to look.

---

<div class="post-metadata">

**Author:** ![just4t](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/just4t/32/1838_2.png) [@just4t](https://discourse.mailinabox.email/u/just4t)\
**Post date:** [November 9, 2019, 8:31pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/3 "2019-11-09T20:31:24Z")

</div>

> [@Danystatic](#):
>
> I want to know how can I configure …

Read [Mail-in-a-Box Advanced Configuration Guide](https://mailinabox.email/advanced-configuration.html#relaying)

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [November 9, 2019, 9:25pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/4 "2019-11-09T21:25:37Z")

</div>

> [@just4t](#):
>
> Read [Mail-in-a-Box Advanced Configuration Guide](https://mailinabox.email/advanced-configuration.html#relaying)

Overkill … as Laravel will connect to a smtp server directly.

---

<div class="post-metadata">

**Author:** ![openletter](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@openletter](https://discourse.mailinabox.email/u/openletter)\
**Post date:** [November 10, 2019, 4:55pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/5 "2019-11-10T16:55:40Z")

</div>

You should be able to replace the Mailgun login information with your MiaB information.

Typically, the advantage of using Mailgun, Sendgrid, etc., is they include list management features, so users are added to managed through lists on their servers, they automatically include opt-out links, marketing links, etc., as the services are intended for managing large lists and other related services.

MiaB is intended for personal or very small SOHO applications. It can be used for transactional email, but that isn’t the intended user base so it does not have the same mailing list features.

---

<div class="post-metadata">

**Author:** ![kurucu](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/kurucu/32/1543_2.png) [@kurucu](https://discourse.mailinabox.email/u/kurucu)\
**Post date:** [February 21, 2022, 7:45am UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/6 "2022-02-21T07:45:04Z")

</div>

Can the two be used together? SOHO users mail via mailinabox, and then configure mailgun to send transactional email without running into identity issues?

---

<div class="post-metadata">

**Author:** ![openletter](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@openletter](https://discourse.mailinabox.email/u/openletter)\
**Post date:** [February 21, 2022, 12:46pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/7 "2022-02-21T12:46:19Z")

</div>

Yes, just configure the necessary DNS records to support the service.

---

<div class="post-metadata">

**Author:** ![kurucu](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/kurucu/32/1543_2.png) [@kurucu](https://discourse.mailinabox.email/u/kurucu)\
**Post date:** [February 22, 2022, 9:02am UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/8 "2022-02-22T09:02:50Z")

</div>

I have all that working, but statements like this (in the advanced section of the guide) throw me off:

> If you have other machines sending mail using a domain name hosted on your Mail-in-a-Box (e.g. a webserver, or any machine that has cron jobs you want to see the output of) we recommend that you configure those machines to relay their outbound mail via the Mail-in-a-Box. Otherwise those emails may be marked as spam by recipients.

So using (e.g. Mailgun) to send e-mail with the appropriate DNS records is enough? Is the separation the [mg.domain.com](http://mg.domain.com) and [box.domain.com](http://box.domain.com) sufficient to allow both to send @domain.com e-mails without running into spam problems?

---

<div class="post-metadata">

**Author:** ![openletter](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@openletter](https://discourse.mailinabox.email/u/openletter)\
**Post date:** [February 22, 2022, 12:53pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/9 "2022-02-22T12:53:11Z")

</div>

Yes, the only issue is whether you have your DNS records configured correctly. People screw these up all the time.

---

<div class="post-metadata">

**Author:** ![kurucu](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/kurucu/32/1543_2.png) [@kurucu](https://discourse.mailinabox.email/u/kurucu)\
**Post date:** [March 14, 2022, 5:11am UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/10 "2022-03-14T05:11:32Z")

</div>

I found the other place that throws me off. Go to admin / Mail & Aliases / Instructions and see:

> Use only this box to send as you
> 
> Your box sets strict email sending policies for your domain names to make it harder for spam and other fraudulent mail to claim to be you. Only this machine is authorized to send email on behalf of your domain names. If you use any other service to send email as you, it will likely get spam filtered by recipients.

Perhaps wording that needs tweaking in a future update.

---

<div class="post-metadata">

**Author:** ![openletter](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@openletter](https://discourse.mailinabox.email/u/openletter)\
**Post date:** [March 14, 2022, 12:45pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/11 "2022-03-14T12:45:54Z")

</div>

It seems correct for the default configuration.

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [March 14, 2022, 5:11pm UTC](https://discourse.mailinabox.email/t/transactional-email-for-my-own-website/5653/12 "2022-03-14T17:11:06Z")

</div>

> [@kurucu](#):
>
> So using (e.g. Mailgun) to send e-mail with the appropriate DNS records is enough? Is the separation the [mg.domain.com](http://mg.domain.com) and [box.domain.com](http://box.domain.com) sufficient to allow both to send @domain.com e-mails without running into spam problems?

Provided that you configure your SPF and DMARC records correctly, yes.

> [@kurucu](#):
>
> I found the other place that throws me off. Go to admin / Mail & Aliases / Instructions and see:
> 
> > Use only this box to send as you
> > 
> > Your box sets strict email sending policies for your domain names to make it harder for spam and other fraudulent mail to claim to be you. Only this machine is authorized to send email on behalf of your domain names. If you use any other service to send email as you, it will likely get spam filtered by recipients.
> 
> Perhaps wording that needs tweaking in a future update.

The only wording change would be adding what I wrote above, but most users do not have the need to tweak their settings. Yours is an exceptional use case.
