# Mail and smtp.office365.com

**URL:** <https://meta.discourse.org/t/mail-and-smtp-office365-com/136872>\
**Category:** Product Support\
**Created:** [December 23, 2019, 8:33am UTC](https://meta.discourse.org/t/mail-and-smtp-office365-com/136872 "2019-12-23T08:33:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![csmu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/csmu/32/124581_2.png) [@csmu](https://meta.discourse.org/u/csmu)\
**Post date:** [December 23, 2019, 8:33am UTC](https://meta.discourse.org/t/mail-and-smtp-office365-com/136872/1 "2019-12-23T08:33:52Z")

</div>

I’m working through [Troubleshoot email on a new Discourse install - #2](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326/2) to work out why mail is not going out on a new discourse instance.

I am able to send mail from the device using [swaks](https://www.jetmore.org/john/code/swaks/)

I can telnet into the mail server [smtp.office365.com](http://smtp.office365.com) 587 (after setting a fully qualified domain name)

Looks like no errors on the production log.

```plaintext
tail -f shared/web_only/log/rails/production.log

```

```plaintext
Started POST "/u/action/send_activation_email" for 115.64.14.90 at 2019-12-23 08:20:28 +0000
Processing by UsersController#send_activation_email as */*
  Parameters: {"username"=>"csmu"}
  Rendering text template
  Rendered text template (Duration: 0.1ms | Allocations: 1)
Completed 200 OK in 36ms (Views: 1.0ms | ActiveRecord: 0.0ms | Allocations: 4557)

```

I see things like this

```plaintext
Cannot open main log file "/var/log/exim4/mainlog"

```

when I run `tail -f shared/web_only/log/var-log/mail.log`

Any ideas on why “/var/log/exim4/mainlog” would be locked out and referenced in `shared/web_only/log/var-log/mail.log` ?

---

_[View the full topic](https://meta.discourse.org/t/mail-and-smtp-office365-com/136872)._
