Sending Outgoing Email V9

If you think that something doesn't work in Aware IM post your message here
Post Reply
JoshK131
Posts: 47
Joined: Tue Jan 26, 2021 11:09 pm

Sending Outgoing Email V9

Post by JoshK131 »

Hello,

I am getting this error when trying to send an email.
"Internal system errorTransaction exception Nonexistent attribute: OutgoingEmailHost"

Here is the process used to test.

IF EXISTS OutgoingEmailAccount WHERE (OutgoingEmailAccount.FromAddress CONTAINS 'xxxxx' ) THEN
FIND OutgoingEmailAccount WHERE (OutgoingEmailAccount.FromAddress CONTAINS 'xxxxx' )
CREATE OutgoingEmail WITH OutgoingEmail.Message='test message', OutgoingEmail.Subject='Test Subject'

IF EXISTS Customer WHERE (Customer.EmailAddress CONTAINS 'aaaaa' ) THEN
FIND Customer WHERE (Customer.EmailAddress CONTAINS 'aaaaa' )
SEND OutgoingEmail TO Customer USING OutgoingEmailAccount

OutgoingEmailAccount was created by the system in business objects.
I am not using the OA Fields at all.

OutgoingEmail is a system created notification.

Customer has got communication enabled to "E-mail"


The server logs show a similar message


Nonexistent attribute: OutgoingEmailHost
at org.openadaptor.dataobjects.FixedDOType.getAttribute(FixedDOType.java:346)
at org.openadaptor.dataobjects.AbstractDataObject.getAttributeValue(AbstractDataObject.java:786)
at com.bas.shared.domain.operation.EntityImpl.getAttributeValue(EntityImpl.java:401)
at com.bas.basserver.iopipes.EmailSink.A(Unknown Source)
at com.bas.basserver.iopipes.EmailSink.handleDelayedNotifications(Unknown Source)
at com.bas.basserver.bsmanager.D.A(Unknown Source)
at com.bas.basserver.bsmanager.E.A(Unknown Source)
at com.bas.basserver.bsmanager.E.A(Unknown Source)
at com.bas.basserver.iopipes.ComponentSink.processMessage(Unknown Source)
at org.openadaptor.adaptor.STPipelineController.processMessage(STPipelineController.java:68)
at com.bas.openadaptor.NonTransactionalController.processMessage(NonTransactionalController.java:136)
at org.openadaptor.adaptor.AbstractSimplePipe.processMessage(AbstractSimplePipe.java:222)
at org.openadaptor.adaptor.STPipelineController.processMessage(STPipelineController.java:68)
at com.bas.openadaptor.NonTransactionalController.processMessage(NonTransactionalController.java:136)
at org.openadaptor.adaptor.AbstractSimpleSource.processMessage(AbstractSimpleSource.java:403)
at org.openadaptor.adaptor.AbstractSimpleSource.sourceProcess(AbstractSimpleSource.java:1049)
at org.openadaptor.adaptor.AbstractSimpleSource.sourceProcess(AbstractSimpleSource.java:1012)
at com.bas.openadaptor.MTJMSListener$JMSMessageHandler.run(MTJMSListener.java:275)
at java.base/java.lang.Thread.run(Thread.java:833)
Exception org.openadaptor.dataobjects.InvalidParameterException trying to commit transaction Nonexistent attribute: OutgoingEmailHost
com.bas.basserver.bsmanager.U: Nonexistent attribute: OutgoingEmailHost
at com.bas.basserver.bsmanager.D.A(Unknown Source)
at com.bas.basserver.bsmanager.E.A(Unknown Source)
at com.bas.basserver.bsmanager.E.A(Unknown Source)
at com.bas.basserver.iopipes.ComponentSink.processMessage(Unknown Source)
at org.openadaptor.adaptor.STPipelineController.processMessage(STPipelineController.java:68)
at com.bas.openadaptor.NonTransactionalController.processMessage(NonTransactionalController.java:136)
at org.openadaptor.adaptor.AbstractSimplePipe.processMessage(AbstractSimplePipe.java:222)
at org.openadaptor.adaptor.STPipelineController.processMessage(STPipelineController.java:68)
at com.bas.openadaptor.NonTransactionalController.processMessage(NonTransactionalController.java:136)
at org.openadaptor.adaptor.AbstractSimpleSource.processMessage(AbstractSimpleSource.java:403)
at org.openadaptor.adaptor.AbstractSimpleSource.sourceProcess(AbstractSimpleSource.java:1049)
at org.openadaptor.adaptor.AbstractSimpleSource.sourceProcess(AbstractSimpleSource.java:1012)
at com.bas.openadaptor.MTJMSListener$JMSMessageHandler.run(MTJMSListener.java:275)
at java.base/java.lang.Thread.run(Thread.java:833)
2024-04-28 22:16:29,966 ERROR sample#admin -Transaction exception Nonexistent attribute: OutgoingEmailHost
Jaymer
Posts: 2539
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Sending Outgoing Email V9

Post by Jaymer »

I’ve had two different issues with the new OA fields relating to missing fields. Yours is the 3rd field now.
Just add the field and be done.
You probably can’t publish now either.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
JoshK131
Posts: 47
Joined: Tue Jan 26, 2021 11:09 pm

Re: Sending Outgoing Email V9

Post by JoshK131 »

Added some fields and a rule in the update to fix the problem.

OutgoingEmailAccount.OutgoingEmailUserName=OutgoingEmailAccount.MailUser
OutgoingEmailAccount.OutgoingEmailHost=OutgoingEmailAccount.MailHost
OutgoingEmailAccount.OutgoingEmailPassword=OutgoingEmailAccount.MailPassword
OutgoingEmailAccount.OutgoingEmailPort=OutgoingEmailAccount.MailPort
OutgoingEmailAccount.OutgoingEmailSSL=OutgoingEmailAccount.MailSSL
OutgoingEmailAccount.OutgoingEmailTLS=OutgoingEmailAccount.MailTLS
OutgoingEmailAccount.OutgoingEmailFromAddress=OutgoingEmailAccount.FromAddress


I know Host, UserName and from address are necessary, the rest were extrapolated and it works now.
Powerm
Posts: 476
Joined: Mon Feb 01, 2010 9:44 pm

Re: Sending Outgoing Email V9

Post by Powerm »

Hi,

I have migrated my one of my v8 app to V9, sending emails using my existing SMTP setting was working fine during the first day of testing then it suddenly stopped ( logs giving a random timeout or authentifacation failure ).
Do you send your email using the "System Settings" too? The new "OutgoingEmailAccount" BO is not clear to me and there no new tutorial about it.
Are you using a normal domain email ( [email protected]), Gmail or a SMTP provider? A sample app/bsv would be great to have as the new CRM sample app has nothing on this ....Thanks!
Independent Developer
Jaymer
Posts: 2539
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

1 of 2 - how to use OutgoingEmailAccount

Post by Jaymer »

OutgoingEmail Account has been around a few years, FYI.

I have an outgoing email BO, renamed to StaffEmail:
outgoing email acct.jpg
outgoing email acct.jpg (75.2 KiB) Viewed 19080 times

A field in RegularUser attaches a StaffEmail record to each user:
RegularUser.jpg
RegularUser.jpg (48.74 KiB) Viewed 19080 times

After the click on the User screen, they can enter their email login details here:
user setup.jpg
user setup.jpg (80.18 KiB) Viewed 19080 times
Last edited by Jaymer on Mon May 13, 2024 4:19 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2539
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

2 of 2

Post by Jaymer »

Here's the process that gets called to email a PO to a Vendor.
A process has already created the OutgoingEmail_PO record.
A scheduler process checks every minute and calls this passing the record to send.
send process.jpg
send process.jpg (188.51 KiB) Viewed 19074 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Powerm
Posts: 476
Joined: Mon Feb 01, 2010 9:44 pm

Re: Sending Outgoing Email V9

Post by Powerm »

Thank you for your screenshots and explanation. About "OutgoingEmail Account has been around a few years, FYI." I just remembered it now, I started with AwareIM in 2010 but never used it :D
Do using a Gmail account to send emails still works in 2024, no OA fields no Gmail Apps needed? Many thanks
Independent Developer
Jaymer
Posts: 2539
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Sending Outgoing Email V9

Post by Jaymer »

Well, as you know, things keep changing in the email world.
I don’t have to use any OAuth stuff, thank goodness.
One thing that comes to mind/memory is since the email is coming from the server, I somehow remember having to go through a process of logging into Gmail from Chrome on the server.
because it needed to do a one time authorization from your email account that this was really you sending the email.
If you didn’t do this, then you would see in the server log how it would keep getting authorization Failed while sending.

And then I seem to remember something about a year ago, on Gmail, where if you couldn’t use OAuth then you could go make up special
passkey, and use that in logging in.

I have another system that uses office 365 with no issue.
But there again, I can’t remember if I had to do a special one time authorization on that one.
This is all over five years of dicking around with emails. I am not remembering all that crap too clearly.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2539
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Emil’s via JSON API

Post by Jaymer »

There was a thread I posted a long time ago about slow email and upcloud.
To find that, just search my posts for Upcloud.

I needed to send groups of hundreds of emails for a yearly event so normal Aware method was out.
Two years ago, I think I was using Twilio (or one of the big names), but it’s too expensive. Last year changed.
Now I’m using postmarkapp.com and it’s really awesome, easy & cheap.
I sent a couple thousand emails via API with no issues.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Powerm
Posts: 476
Joined: Mon Feb 01, 2010 9:44 pm

Re: Sending Outgoing Email V9

Post by Powerm »

On my side I have contacted my hosting provider and got my VPS's IP whitelisted to have my AwareIM emails working again...even if you send 10 test emails they block you :shock:

Many thanks again for you help, I will try to implement postmarkapp.com for sure using their API :D
Independent Developer
Post Reply