Send emails from a C# Method not working
Hello, I am trying to send an email from within a C# method but I am not receiving the message in my email. My code is made up of trying to check a url and then return if the url returned with an OK status or a 404 Error. When I get to the part where I want to send the email to myself it runs the code but I do not receive the message. Below is a snippet of my code. The result boolean value is returning true. Any idea what could be wrong? Item fromUser = this.newItem("User", "get"); fromUser.setProperty("login_name", "admin"); fromUser = fromUser.apply(); //Get email message Item email_msg = this.newItem("EMail Message", "get"); email_msg.setProperty("name", "ARAS Job Scheduler"); email_msg = email_msg.apply(); email_msg.setProperty("subject", "Series Website Check " + DateTime.Now.ToString()); email_msg.setProperty("body_plain", messageBody); email_msg.setPropertyItem("from_user", fromUser); //Get admin Identity Item iden = this.newItem("Identity", "get"); iden.setProperty("name", "Joshua Bowden"); iden = iden.apply(); //return inn.newError(email_msg.ToString()); bool result = this.email(email_msg, iden);Solved3.5KViews0likes6CommentsError while sending email to the group Identity when email id not present for some users
Hi Experts, I am using the Aras OOTB function to send the emails. Please find below code - document.thisItem.email(EmailBody, GroupIdentity); When all the members of the group identity have email ID's present then it is working fine, but if any of the members email is not provided then it is returning the error and not sending emails to any member. Is there any way to handle this?3KViews0likes1CommentContext from method to called email
I've got an email that I'm calling from a "post" method on the Part lifecycle, but the default context that's passed to that email message isn't the Part, it instead seems to be the alphabetically first Identity in my database? Why is this happening, and is it possible to (and how can I) pass the Part as the context item to the email, so I can use xpath variables for that part in the email? Alternatively, if there's a good way to just find the part that's being promoted via the email message query, that's fine too. That's the goal, however I need to get there. Here's the method that's running, for what it's worth: Innovator inn = this.getInnovator(); if (this.getProperty("classification", "") == "Hull Assembly") { Item checkIsRoot = this.newItem("Part BOM","get"); checkIsRoot.setAttribute("select","id"); checkIsRoot.setAttribute("maxRecords","1"); checkIsRoot.setProperty("related_id",this.getID()); checkIsRoot = checkIsRoot.apply(); if(checkIsRoot.isError()) { //First grab an identity to send the mail to. Item iden = inn.getItemById("Identity", "097FB092EBDE42EB9E5A274ABC0059DA"); //Next, grab the email we want Item myResult = inn.applyAML("<AML>"+ "<Item type='Email Message' action='get'>"+ "<name>BOM_Release</name>"+ "</Item></AML>"); Item myEmail = myResult.getItemByIndex(0); iden.email(myEmail, iden); } } return this;Solved2.9KViews0likes2CommentsAras does not send emails
Hi all! For some time now the Aras server has ceased send emails. No errors (even if I set wrong value to "Mail SMTPServer" parameter to InnovatorServerConfig.xml). No connection attempts in the mail server logs. But the emails to be sent appear in the "Innovator\Server\temp" folder on the server. But nothing else happens. It looks like the server is not trying to send them. What can be wrong? Aras 12.0 SP9 free.Solved2.8KViews0likes2CommentsSend return email to the user in workflow after approve.
Hi Guys, I am trying to send email from workflow. When i assign item to user then sending mail with all details to that user. Once that user approves it, then i want to get email as “Item is approved” or send email reverse to the owner or creator. I tried to check the email notification events like “OnClosed”,”OnVote” etc, but i am not getting any emails even it is approved by assigned user. Can you please help me on it and suggest. Thanks, Aaba.2.5KViews0likes1CommentWhat is the best way to validate whether an item has a parent?
I'm trying to send an email on promotion to "Released" of Parts when a couple of criteria are met, the parts being of a certain custom classification we've added, and them not being used in another BOM anywhere (i.e. they're top-level Parts being released). What's the best way to go about checking whether the part is a top-level part (i.e. doesn't have a parent)? I've tried isRoot(), getParentItem(), and getProperty("source_id"), but I'm either misusing those or for some reason they're not working for my case. This is what I have tried so far (this method is attached as a Post method to the lifecycle transitions to Released, and it is generating the emails, it's just not limiting it to only the times when it's a top-level BOM, like I want): [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:c6adf788-e399-4db7-b63a-90e953d6ebf3:type=csharp&text=Innovator%20inn%20%3D%20this.getInnovator%28%29%3B%0D%0AItem%20myResult%3B%0D%0Aif%20%28this.getProperty%28%22classification%22%2C%20%22%22%29%20%3D%3D%20%22Hull%20Assembly%22%20%26%26%20this.isRoot%28%29%20%3D%3D%20true%29%0D%0A%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2Femail%20code%0D%0A%7D%0D%0Areturn%20this%3B%0D%0A%0D%0A%0D%0A%2F%2For%0D%0A%0D%0A%0D%0AInnovator%20inn%20%3D%20this.getInnovator%28%29%3B%0D%0AItem%20myResult%3B%0D%0Aif%20%28this.getProperty%28%22classification%22%2C%20%22%22%29%20%3D%3D%20%22Hull%20Assembly%22%20%26%26%20this.getParentItem%28%29%20%3D%3D%20null%29%0D%0A%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2Femail%20code%0D%0A%7D%0D%0Areturn%20this%3B%0D%0A%0D%0A%0D%0A%0D%0A%2F%2For%0D%0A%0D%0A%0D%0AInnovator%20inn%20%3D%20this.getInnovator%28%29%3B%0D%0AItem%20myResult%3B%0D%0Aif%20%28this.getProperty%28%22classification%22%2C%20%22%22%29%20%3D%3D%20%22Hull%20Assembly%22%20%26%26%20this.getProperty%28%22source_id%22%2C%20%22%22%29%20%3D%3D%20%22%22%29%0D%0A%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2Femail%20code%0D%0A%7D%0D%0Areturn%20this%3B]Solved2.5KViews0likes2CommentsSSVC email message contains incorrect item URL - how to modify?
Hello all, I am currently testing SSVC email notifications and notice they are showing the wrong URL for the Item link, using 'localhost' as the prefix. I have checked all my configuration files and do not appear to be using localhost anywhere. Where is the email notification pulling this value from and/or how can I modify the format? The email message template doesn't have a typical query string and shows the following: <table border="0" cellspacing="0" cellpadding="0" id="templateContainer" style="font-family: Arial,Helvetica,sans-serif; max-width: 600px"> <tbody style="max-width: inherit;"> <tr> <td style="border-bottom: 1px solid #d4d4d4; padding-bottom: 10px; color: #444444">{NotificationDescription}</td> </tr> {Messages} </tbody> </table> Any help is appreciated. Our version is Innovator 12 SP14.1.6KViews0likes5CommentsCN ID
I am trying to add the affected_name to my email notification. In the bottom part of this script, how do get the CN id so I am accessing the correct related affected items in the script below? <Item type="a_CN" action="get" select="id,cn_number,title,a_businessunit,customer(keyed_name),top_assy_pn(keyed_name),team_id,change_reason,change_summary"> <id>${Item/id}</id> <team_id> <Item type="Team" action="get"> <Relationships> <Item type="Team Identity" action="get"> <team_role>52C5CF6C021A443D845CF6F623EF48C4</team_role> <related_id> <Item type="Identity" action="get" select="name"></Item> </related_id> </Item> </Relationships> </Item> </team_id> </Item> <Item type="a_CN_Affected_Item" action="get" source_id="${a_CN/id} select="affected_name"> </Item>907Views0likes0Comments