botserver/templates/default.gbai/default.gbdialog/send-email.bas

27 lines
754 B
QBasic
Raw Normal View History

PARAM to_email AS EMAIL LIKE "user@example.com" DESCRIPTION "Recipient email address"
PARAM subject AS STRING LIKE "Important Message" DESCRIPTION "Email subject line"
PARAM body AS STRING LIKE "Hello, this is the email content." DESCRIPTION "Email body content"
PARAM from_email AS EMAIL LIKE "noreply@company.com" DESCRIPTION "Sender email address" OPTIONAL
2025-11-21 10:44:29 -03:00
DESCRIPTION "Send an email to any recipient with subject and body"
IF NOT from_email THEN
2025-11-24 13:02:30 -03:00
from_email = "noreply@pragmatismo.com.br"
2025-11-21 10:44:29 -03:00
END IF
WITH email_data
to = to_email
from = from_email
subject = subject
body = body
timestamp = NOW()
END WITH
2025-11-21 10:44:29 -03:00
SEND EMAIL to_email, subject, body
2025-11-21 10:44:29 -03:00
SAVE "email_log.csv", email_data
2025-11-21 10:44:29 -03:00
TALK "Email sent to " + to_email
2025-11-21 10:44:29 -03:00
RETURN email_data