Sendmail Error

Hello,

I have been getting the error below. I am not certain what is wrong with the syntax.

Hi @Keith,

It’s a little hard to tell what the syntax error might be due to the censoring of sections of the code. Can you send me a backup.tar file with the support files included from eBuddy so we can take a closer look at this?

[hidden]

I believe there is one field missing: Cc.

SENDMAIL $EmailTo$,"",$EmailSubject$,$EmailBody$

1 Like

Hi Keith,

I believe @rmac is right, it looks like you’re missing one of the required fields for the sendmail command:

You could make leave it empty by doing open quotes like this example:

Onchange “Email_Example”, “@tagmail()”
Function tagmail()
$EmailTo$ = “Johnsmith@email.com”
$EmailCC$ = ""
$EmailSubject$ = “Daily Report”
$EmailBody$ = “”
$EmailBody$ = $EmailBody$ + "Value of First Tag is " + STR$ Digital_Example@ + CHR$(13) + CHR$(10) // the CHR$(13) + CHR$(10) is the same as newline
$EmailBody$ = $EmailBody$ + "Value of Second Tag is " + STR$ Analog_Example@ + CHR$(13) + CHR$(10) // Second line of email
$EmailBody$ = $EmailBody$ + "Value of Third Tag is " + CHR$(13) + CHR$(10) // Third Line of email… ect
$EmailBody$ = $EmailBody$ + "Time: " + TIME$ + CHR$(13) + CHR$(10) // Gives the full date when this was sent

$EmailAttachment$ = “&[$dtUF $fnSomeIntegerReport.txt]”
$EmailContents$ = $EmailBody$ + $EmailAttachment$
SENDMAIL $EmailTo$, $EmailCC$, $EmailSubject$, $EmailContents$
ENDFN

I’ll give that a try. I did not realize that was a requirement. Thanks.

That was it, thanks!

Hi Keith,

Glad to hear we could get it working!