Using CC.net 1.8.5, I'd like to configure the email publisher so that, after a forced build, it always sends out an email to the person who forced the build (they usually do so via CCTray). In addition, some people should always receive emails when a build finishes (regardless of success), and breakers and fixers should also always receive email.
In the current configuration, all of this works except the email to the requester.
<email from="$(EmailSender)" subjectPrefix="[$(BuildSystem_Name) $(adornment)]" mailhost="$(EmailHost)" mailport="$(EmailPort)" useSSL="$(EmailSSL)" mailhostUsername="$(EmailUser)" includeDetails="TRUE" mailhostPassword="$(EmailPass)" >
<users>
<cb:developers />
<user name="buildmaster1" group="buildmaster" address="$(email1)"/>
<user name="buildmaster2" group="buildmaster" address="$(email2)"/>
<user name="buildmaster3" group="buildmaster" address="$(email3)"/>
</users>
<groups>
<group name="buildmaster">
<notifications>
<notificationType>Change</notificationType>
</notifications>
</group>
</groups>
<modifierNotificationTypes>
<notificationType>Failed</notificationType>
<notificationType>Fixed</notificationType>
</modifierNotificationTypes>
</email>
The "developers" are defined above this block like this:
<cb:define name="developers">
<user name="<svn-user-name>" address="<real-name>#our-company.com"/>
...
</cb:define>
They map subversion user names to email addresses. $(email1) etc. are the addresses of the people who always want to receive emails.
I know that the name of the requester is available in the variable $(CCNetUser) but I don't know how to map it to an email address which the email publisher could use. Appreciate any help.
Hans
Related
I'm developing a web application for real estate agents and their clients to easily handle offer management for real estate transactions. Using docusign's API, I'm hoping to allow my users to use embedded signing features to sign and submit documents regarding offers of their transaction.
The major issue/problem we want to solve is allowing local access to the docusign documents natively within our web application. Meaning, if a user submits a document on our platform, and requests multiple parties to sign the given document, we would like to keep a live copy within our application as it gets signed by multiple parties.
Currently, most implementations of the API simply send over the original document to docusign, and use their backend to update and notify parties when signatures have been requested or completed; meanwhile the original document submitted by the user to the platform, remains in it's original condition without any updates or changes; which can be confusing for users of the platform to keep track of the document status.
Any help in regards to solving this issue would be greatly appreciated. Is this possible? if so what tools and services are required to achieve this.
Meaning, if a user submits a document on our platform, and requests
multiple parties to sign the given document, we would like to keep a
live copy within our application as it gets signed by multiple
parties.
I have a couple suggestions. Let me know if either is what you're looking for:
First, you can call GET /envelopes/{envelopeId}/documents/{doucmentId} to retrieve docs from an envelope. Here's a link to more info on this endpoint.
Now, it also sounds like you may want to provide your realtor users with envelope status in real-time. There are a couple of ways to accomplish this, but one is greatly preferred.
Technically you CAN retrieve information about your envelopes by calling GET /envelopes?include=recipients,tabs. On your front end, this enables you to dynamically update components, such as a color-coded status column indicating to users where their agreements are in the pipeline. Downside here is that there are polling restrictions, which limit you to one such call every 15 minutes.
The preferred method is to use the Connect webhook notification service. When you create a connect configuration in your account, you can proactively receive information about your envelopes moments after events occur. (We'll ping you.) Then you can update front end components to keep your agents in the know.
Here's a sample connect notification:
<?xml version="1.0" encoding="utf-8"?>
<DocuSignEnvelopeInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.docusign.net/API/3.0">
<EnvelopeStatus>
<RecipientStatuses>
<RecipientStatus>
<Type>Signer</Type>
<Email>user.email#address.com</Email>
<UserName>User Name</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2010-06-26T09:19:18.883</Sent>
<Delivered>2010-06-26T09:19:40.723</Delivered>
<DeclineReason xsi:nil="true" />
<Status>Delivered</Status>
<RecipientIPAddress>::1</RecipientIPAddress>
<CustomFields />
<TabStatuses>
<TabStatus>
<TabType>Custom</TabType>
<Status>Active</Status>
<XPosition>364</XPosition>
<YPosition>52</YPosition>
<TabLabel>Radio</TabLabel>
<TabName>Two</TabName>
<TabValue />
<DocumentID>1</DocumentID>
<PageNumber>2</PageNumber>
<OriginalValue />
<ValidationPattern />
<RoleName>TestRole</RoleName>
</TabStatus>
</TabStatuses>
<AccountStatus>Active</AccountStatus>
<RecipientId>fb89d2ee-2876-4290-b530-ff1833d5d0d2</RecipientId>
</RecipientStatus>
</RecipientStatuses>
<TimeGenerated>2010-06-26T09:19:45.771206-07:00</TimeGenerated>
<EnvelopeID>0aa561b8-b4d9-47e0-a615-2367971f876b</EnvelopeID>
<Subject>CreateEnvelopeFromTemplates Test</Subject>
<UserName>User Name</UserName>
<Email> user.email#address.com </Email>
<Status>Delivered</Status>
<Created>2010-06-26T09:16:21.27</Created>
<Sent>2010-06-26T09:19:19.01</Sent>
<Delivered>2010-06-26T09:19:40.747</Delivered>
<ACStatus>Original</ACStatus>
<ACStatusDate>2010-06-26T09:16:21.27</ACStatusDate>
<ACHolder>ACHolder Name</ACHolder>
<ACHolderEmail> ACHolder.email#address.com </ACHolderEmail>
<ACHolderLocation>ACHolder Location</ACHolderLocation>
<SigningLocation>Online</SigningLocation>
<SenderIPAddress>::1 </SenderIPAddress>
<EnvelopePDFHash />
<CustomFields>
<CustomField>
<Name>Envelope Field 1</Name>
<Show>False</Show>
<Required>False</Required>
<Value />
</CustomField>
<CustomField>
<Name>Envelope Field 2</Name>
<Show>False</Show>
<Required>False</Required>
<Value />
</CustomField>
</CustomFields>
<AutoNavigation>true</AutoNavigation>
<EnvelopeIdStamping>true</EnvelopeIdStamping>
<AuthoritativeCopy>false</AuthoritativeCopy>
<DocumentStatuses>
<DocumentStatus>
<ID>1</ID>
<Name>Document_Name</Name>
<TemplateName>radio parents</TemplateName>
<Sequence>1</Sequence>
</DocumentStatus>
</DocumentStatuses>
</EnvelopeStatus>
<DocumentPDFs>
<DocumentPDF>
<Name>DocumentPDF_Name</Name>
<PDFBytes>PDFBytes_Information</PDFBytes>
</DocumentPDF>
</DocumentPDFs>
</DocuSignEnvelopeInformation>
We send some DocuSign envelopes via email and we can't find anything in the API that will tell us if a signer failed security check. The envelope status stays in 'sent'.
The docs do not mention any status that would correspond to failed security check: https://docs.docusign.com/esign/guide/appendix/status_and_error_codes.html#envelope--recipient-status-codes
Are you using Connect to receive status events? You can have it tell you when there's an Authentication Failure. Here's what comes through when that happens. You're right the Envelope status stays Sent. The Failure is noted lower down. I imagine you'd get the same if you called the API to get envelope status directly.
<EnvelopeStatus>
<RecipientStatuses>
<RecipientStatus>
<Type>Signer</Type>
<Email>XXXXX</Email>
<UserName>John Q Signer</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2014-12-30T07:29:45.747</Sent>
<DeclineReason xsi:nil="true" />
<Status>Sent</Status> <!-- STILL SENT -->
<RecipientIPAddress />
<IDCheckInformation />
<RecipientAuthenticationStatus>
<IDQuestionsResult>
<Status>Failed</Status> <!-- HERE IS THE FAILURE -->
<EventTimestamp>2014-12-30T13:30:09.79Z</EventTimestamp>
</IDQuestionsResult>
<IDLookupResult>
<Status>Passed</Status>
<EventTimestamp>2014-12-30T13:30:09.79Z</EventTimestamp>
</IDLookupResult>
</RecipientAuthenticationStatus>
I'm running a command line program (happens to be Redis) inside a Windows Azure Worker Role using ProgramEntryPoint as follows
<WorkerRole name="Worker" vmsize="Small">
<Runtime executionContext="limited">
<Environment>
<Variable name="ADDRESS">
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/Endpoints/Endpoint[#name='Redis']/#address" />
</Variable>
<Variable name="PORT">
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/Endpoints/Endpoint[#name='Redis']/#port" />
</Variable>
</Environment>
<EntryPoint>
<ProgramEntryPoint commandLine="redis-server.exe" setReadyOnProcessStart="true" />
</EntryPoint>
</Runtime>
<Endpoints>
<InternalEndpoint name="Redis" protocol="tcp" port="6379" />
</Endpoints>
</WorkerRole>
So far, so good (it works).
I now want to run a slave instance of the server in another WorkerRole
<WorkerRole name="SlaveWorker" vmsize="Small">
<Runtime executionContext="limited">
<EntryPoint>
<ProgramEntryPoint commandLine="echo slaveof %ADDRESS% %PORT% | redis-server.exe -" setReadyOnProcessStart="true" />
</EntryPoint>
</Runtime>
<Imports>
<Import moduleName="Diagnostics" />
<Import moduleName="RemoteAccess" />
</Imports>
<Endpoints>
<InternalEndpoint name="Redis" protocol="tcp" port="6379" />
</Endpoints>
</WorkerRole>
You can see I need to tell the slave server where its master is using IP address and port; something that I don't know until Azure has allocated the network resources for that role. I've seen #smarx do something along these lines.
However I think there may be a couple of things wrong with this in my case
I'm setting environment variables in one role and hoping to use them in another - not going to work.
Even if the right data was available the way I need to pass it to the redis-server.exe is not recognized as a valid entry point with the echo at the beginning
Is the only way to know the runtime IP address and Port of another
worker role via code or is there a syntax I'm missing in the config
file?
If I manage to get the IP and Port, is the only way to make my
command line work to push it to a powershell script or batch file?
Thanks for your thoughts.
The only way one instance will know another's IP address will be if a.) it programmatically grabs it, or b.) the other instance publishes it to a wellknown location (e.g. table storage). In your case, it might be easiest to just have the slave role run a startup task that accesses the RoleEnvironment (via Powershell perhaps) and sets an Environment variable with the IP Address of the master. If you do this as a 'simple' type, I believe it will run before your ProgramEntryPoint does (blocking) and you can just use the env var in your command line there.
Couple thoughts here however:
How are you handling multi-instance within a role? Are you only planning on running a single instance?
Do you need two different roles? Why not a single role with 2 instances that decide via election which is master?
I am just learning all this stuff (CCNet), and have a simple working
ccnet.config, that successfully executes through the localhost/ccnet
service. I am trying to get security set up so that users in other
locations can use cctray. I added this to the ccnet.config file
(copied and modified from one of the security examples (internalSecurity)....
<cruisecontrol>
<internalSecurity>
<users>
<!-- Authenticated users -->
<passwordUser name="account1" display="me (Installer)"
password="%account1"/>
</users>
<permissions>
<!-- Roles -->
<rolePermission name="Releasers" forceBuild="Allow"
defaultRight="Allow" viewProject="Allow">
<users>
<userName name="account1"/>
</users>
</rolePermission>
</permissions>
</internalSecurity>
<project name="test project">
Now, when I click on the 'force' button on http://localhost/ccnet/ViewFarmReport.aspx,
I get the following exception message..."Request processing has failed
on the remote server. Permission to execute ViewProject has been
denied. I am not sure what is happening here. I am logged onto the
server as 'account1', and, I have added viewProject="Allow" to the
rollPermission name="Releasers".
look at the docs here for security setup :
http://www.cruisecontrolnet.org/projects/ccnet/wiki/Security_scenarios
CCNet config looks right. You might try restarting the CCNET executable in order for it to pick up the config changes. Depends on how CCNET is set up in your case usually it needs a restart at the CCNET service on Windows.
I'm trying to make Sitecore send messages through a gmail-account but it wont work.
This is my settings in web.config:
<setting name="MailServer" value="smtp.gmail.com" />
<!-- MAIL SERVER USER
If the SMTP server requires login, enter the user name in this setting
-->
<setting name="MailServerUserName" value="adress#gmail.com" />
<!-- MAIL SERVER PASSWORD
If the SMTP server requires login, enter the password in this setting
-->
<setting name="MailServerPassword" value="secret" />
<!-- MAIL SERVER PORT
If the SMTP server requires a custom port number, enter the value in this setting.
The default value is: 25
-->
<setting name="MailServerPort" value="587" />
And this is the error from the log:
6068 09:14:57 ERROR Failed to send analytics report
Exception: System.Net.Mail.SmtpException
Message: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. u9sm3416817eeh.17
Source: System
at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Sitecore.MainUtil.SendMail(MailMessage message)
at Sitecore.Analytics.Reports.ReportMailer.Mail(String exportedReportFileName, IEnumerable`1 recipients, String reportTitle, Boolean embedFile, Boolean deleteFile)
I know that it has something to do with gmail requiring some kind of secure connection but how do I make Sitecore provide this?
In 8.2 update 4 (don't know about previous updates/releases) there's a special setting for that:
<setting name="MailServerUseSsl" value="true" />
Message: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first.
gmail requires TLS connection. Can try looking into stunnel.
Anyways, serverfault or superuser.com is probably more appropriate.
The SendMail function in Sitecore.MainUtil does not have an option to set SmtpClient.EnableSsl to True. For now, it looks like you will need to find another SMTP server to use.
You may want to log this as a feature request with Sitecore.
I am successfully connect to GMAIL using Email Campaign module which has the STARTTLS feature.
Here are my settings:
<!--Set it to "true" if you want use the SMTP settings below. You should purchase the right of using the "UseLocalMTA" setting first.-->
<setting name="UseLocalMTA" value="true" />
<setting name="SMTP.Server" value="smtp.gmail.com" />
<setting name="SMTP.Port" value="587" />
<setting name="SMTP.LoginDomain" value="" />
<setting name="SMTP.UserName" value="user#gmail.com" />
<setting name="SMTP.Password" value="12345" />
<setting name="SMTP.AuthMethod" value="PLAIN" />
<setting name="SMTP.StartTLS" value="true" />