Sending Text Message Through Email

I want to send a text message through a wireless carrier. Their form is:

[phone number]

However, if I start the address with a number I get the following error:

java.lang.ClassCastException: Cannot coerce value '’ into type: class [Ljava.lang.String;

I can use a regular email address with no problem. is there a way around this? Here’s the script:

def NotifyKurt(strMessage):	
	import system
	fromStr = ""
	subjectStr = "Notification"	
	destStr = ''
	bodyStr = strMessage"iaexch",fromStr,subjectStr,bodyStr,0,destStr)

I was about to attempt the same. So I am interested in this answer as well.

The function takes a list of email addresses:def NotifyKurt(strMessage): import system fromStr = "" subjectStr = "Notification" destList = [''] bodyStr = strMessage"iaexch",fromStr,subjectStr,bodyStr,0,destList)Take a look at the documentation for the function here:

recipients = [“”, "", "", ""]

so you say this would work instead?

destStr = [""]


Thank you Travis… now can you help me with my last post 8)

Now I’m getting a different error. But that address works from my regular email client.

Traceback (innermost last):

  File "<script playground>", line 1, in ?

  File "<module:Notify>", line 7, in NotifyKurt

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error sending email.

Caused by: javax.mail.SendFailedException: Invalid Addresses;

  nested exception is:

	com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for

Line 7 is the last with:"iaexch",fromStr,subjectStr,bodyStr,0,destList)

I think the important part here is:

550 5.7.1 Unable to relay for

The problem at this point is either the mail server your routing through or how you have the connection defined in the notification profile.

Normally 5.7.1 means that the mail server isn’t setup to relay the message, or it was blocked by a spam filter on its way out.