Fill in the email settings in the admin UI
Hans Karlsen (talk | contribs) No edit summary |
Hans Karlsen (talk | contribs) No edit summary |
||
Line 17: | Line 17: | ||
Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl -Credential (Get-Credential) | Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl -Credential (Get-Credential) | ||
PowerShell will open a Windows dialog box to enter the SMTP credintials. Enter username and password there. | PowerShell will open a Windows dialog box to enter the SMTP credintials. Enter username and password there. | ||
If you are on azure-ps-prompt pwd dialog will fail - try: | |||
$username = 'user@url.se' | |||
$password = ConvertTo-SecureString 'thepwd' -AsPlainText -Force | |||
$psCred = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $password) | |||
Send-MailMessage -From 'user@url.se' -Credential $psCred -To 'someone@somewhere.se' -Subject 'Test1000' -Body 'Body test1' -UseSsl -Port 587 -SmtpServer 'smtp.office365.com' |
Revision as of 07:26, 9 June 2022
In order for your MDrivenServer to be able to send emails it will need access to an SMTP service. You can sign up with gmail and use your information from there to have access to an internet connected SMTP server.
You enter the information in the MDrivenServer interface as described in the image below:
Read how to make your app actually produce emails Emailing from an app using MDrivenServer
Testing you email server outside of the MDriven Server
Start Windows PowerShell and enter the following (pasting is easiest). The example below works for Office365
$From = "<senders address, not login>" $To = "<destination email address>" $Subject = "Test 1" $Body = "This is what I want to say" $SMTPServer = "smtp.office365.com" $SMTPPort = "587" Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl -Credential (Get-Credential)
PowerShell will open a Windows dialog box to enter the SMTP credintials. Enter username and password there.
If you are on azure-ps-prompt pwd dialog will fail - try:
$username = 'user@url.se' $password = ConvertTo-SecureString 'thepwd' -AsPlainText -Force $psCred = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $password) Send-MailMessage -From 'user@url.se' -Credential $psCred -To 'someone@somewhere.se' -Subject 'Test1000' -Body 'Body test1' -UseSsl -Port 587 -SmtpServer 'smtp.office365.com'
This page was edited 86 days ago on 02/10/2024. What links here