0

Sending emails - ChatGPT example

Can anyone confirm if this would indeed work in Ninox?  I'm guessing not.

do you have an example of code for sending emails using Ninox

ChatGPT

Certainly! Here's an example of code that demonstrates how to send emails using Ninox Script:

 

 

let smtpServer := "smtp.example.com" let smtpPort := 587

let smtpUsername := "your-email@example.com"

let smtpPassword := "your-password"

let senderName := "Your Name"

let senderEmail := "your-email@example.com"

let recipientName := "Recipient Name"

let recipientEmail := "recipient-email@example.com"

let subject := "Test Email"

let body := "This is a test email."

let mail := new Email

mail.server(smtpServer, smtpPort)

mail.username(smtpUsername)

mail.password(smtpPassword)

mail.sender(senderName, senderEmail)

mail.recipient(recipientName, recipientEmail)

mail.subject(subject)

mail.body(body)

let result := mail.send() if result = true

then message("Email sent successfully!")

else message("Failed to send email.") endif

Reply

null

Content aside

  • 9 mths agoLast active
  • 47Views
  • 1 Following