Announcement

Collapse
No announcement yet.

SMTP error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SMTP error

    I'm struggling with emails from the mcsSprinklers Plugin. (email sending works in general for Homeseer, but not mcsSprinklers)

    I get this error:

    Exception sending email via smtp.xxx.xxx (To:xxxxx@xxxxxx.xx, cc:, bcc:, Sub:mcsSprinklers Email Test, Attach = Tried to read a line. Only '' received. Please make sure that antivirus and firewall software are disabled or configured correctly.

    (I have masked out the smtp server and email)

    my smtp server uses non standard port and TLS security with authentication. cant see where to configure this other than in the general email setup for homeseer.
    Attached Files

    #2
    The plugin goes through the HS API for email. The following exists in the plugin to bridge the HS2 to HS3 syntax for SendEmail
    Code:
        Public Sub SendEmail(ByVal sTo, ByVal sFrom, ByVal sSubject, ByVal sBody, ByVal sAttachmentPath)
            ohs.SendEmail(sTo, sFrom, "", "", sSubject, sBody, sAttachmentPath)
        End Sub
    The actual plugin call to this helper function that occurs when an email is to be sent is
    Code:
    hs.SendEmail(gEmailAddress, gEmailAddress, sMessage, sText, "")
    gEmailAddress is read from mcsSprinklers.ini Other Page key "EmailAddress"


    The following is from HS3 scripting document. The non-standard ports etc do not have any scripting parameters. I do not see where mcsSprinklers would be any different than other plugins for sending email though this API.

    Code:
    SendEmail
    Purpose
    This function will send an E-mail message.
    The attach parameter is useful if you would like to E-mail a picture taken with a digital camera. Just attach the path to any picture file created by the camera.
    Parameters
    Parameter: mto
    Type: string
    Description: This is the address you are sending the E-mail to.
    Scripting . 172
    HomeSeer HS3 - End User Documentation
    Parameter: mfrom
    Type: string
    Description: This is the address you are sending from. Note that some ISPs will not allow you to put just anything in this field. You may be required to
    put your real E-mail address here. If you are using MAPI to handle your E-mail, MAPI will enter your E-mail address that is associated with your default
    E-mail account. In that case, this field will be ignored.
    parameter:mCC
    Type: string
    Description: CC address
    Parameter: mBCC
    Type: string
    Description: This is BCC to address.
    Parameter: msubject
    Type: string
    Description: This is the subject of the E-mail.
    Parameter: message
    Type: string
    Description: This is the body of the E-mail.
    Parameter: attach (optional)
    Type: string
    Description: This is the absolute path name to the file to be attached to the E-mail.

    Comment


      #3
      I don't have any other plugin that sends email, but when sending email from HS events it works.

      I guess this script function is not updated by HST to fully work...

      Sent fra min F8331 via Tapatalk

      Comment


        #4
        In your email event did you include the last parameter for attachment? Perhaps HS3 is confused with a blank string vs. no parameter since it is optional. You could try to replicate what mcsSprinklers is trying to do in your event.

        Comment


          #5
          In my event I only send pure text email as the destination is a email to SMS address.

          My event uses the email function in the event engine, not through scripts.

          Sent fra min F8331 via Tapatalk

          Comment


            #6
            I setup a one line script event and see the following in the log, however no email was received. I also did it with the email event action and the email was received. In both cases the log indicated it was send successfully.

            Jun-01 1:52:04 PM email Email successfully sent to xxx

            Jun-01 1:51:58 PM Event Running script statement immediately: &hs.sendemail "xxx","2","","","3","4",""

            Jun-01 1:51:58 PM Event Event Trigger "New Group Email"

            Jun-01 1:51:58 PM Event Event New Group Email triggered by the event page 'Run' button.

            Jun-01 1:47:03 PM email Email successfully sent to xxx

            Jun-01 1:46:49 PM Event Event Trigger "New Group Email"

            I then went to mcsSprinklers Other Page and Email a debug file. In this case the text part of the email was delivered, but the .gz and .ini attachments were not.

            Never did I get any error messages in the HS3 log related to email.

            in 2.17.0.9 I enabled the email on valve failure and testing using t he HS3 email it worked as expected.
            Last edited by Michael McSharry; June 1, 2017, 06:26 PM.

            Comment


              #7
              If i try this &hs.sendemail "yyy@zz.no","yyy@zz.no","","","3","4","" from the HS3 controll panel I do get a email message with subject "3" and body "4" (and no error message).

              If I try to send a test message from mcsSprinklers I get error.
              Attached Files

              Comment

              Working...
              X