Skip to content

Commit

Permalink
GMAIL as SMTP guide
Browse files Browse the repository at this point in the history
  • Loading branch information
jokob-sk committed Jan 23, 2023
1 parent 8b4115f commit 5b35e68
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
15 changes: 15 additions & 0 deletions docs/SMTP_GMAIL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Use the Gmail SMTP server

1) Create an app password by following the instructions from Google, you need to Enable 2FA for this to work.
[https://support.google.com/accounts/answer/185833](https://support.google.com/accounts/answer/185833)

2) Specify the following settings:

```python
SMTP_SKIP_TLS=True
SMTP_FORCE_SSL=True
SMTP_PORT=465
SMTP_SERVER='smtp.gmail.com'
SMTP_PASS='16-digit passcode from google'
```

2 changes: 1 addition & 1 deletion front/php/templates/language/en_us.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
'REPORT_MAIL_name' => 'Enable email',
'REPORT_MAIL_description' => 'If enabled an email is sent out with a list of changes you\'ve subscribed to. Please also fill out all remaining settings related to the SMTP setup below.',
'SMTP_SERVER_name' => 'SMTP server URL',
'SMTP_SERVER_description' => 'The SMTP server host URL. For example <code>smtp-relay.sendinblue.com</code>. I don\'t recommend using Gmail as an SMTP server as the setup is <a target="_blank" href="https://support.google.com/a/answer/176600">quite complex</a> (I couldn\'t get it to work - Please reach out with a guide if you did)',
'SMTP_SERVER_description' => 'The SMTP server host URL. For example <code>smtp-relay.sendinblue.com</code>. To use Gmail as an SMTP server <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SMTP_GMAIL.md">follow this guide</a>',
'SMTP_PORT_name' => 'SMTP server PORT',
'SMTP_PORT_description' => 'Port number used for the SMTP connection. Set to <code>0</code> if you don\'t want to use a port when connecting to the SMTP server.',
'SMTP_SKIP_LOGIN_name' => 'Skip authentication',
Expand Down
5 changes: 0 additions & 5 deletions front/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ function toggleAllSettings()
function handleEvent (value){
setParameter ('Front_Event', value)

// console.log(value)

// show message
showModalOk("<?php echo lang("general_event_title")?>", "<?php echo lang("general_event_description")?> <code id='"+modalEventStatusId+"'></code>");

Expand All @@ -486,9 +484,6 @@ function updateModalState(){
setTimeout(function(){
displayedEvent = $('#'+modalEventStatusId).html()

// console.log(displayedEvent)
// console.log(displayedEvent.indexOf('finished') == -1)

// loop until finished
if(displayedEvent.indexOf('finished') == -1) // if the message is different from finished, check again in 4s
{
Expand Down

0 comments on commit 5b35e68

Please sign in to comment.