Email Configurations — Business Rules and Routing¶
Current SMTP Configuration¶
Located in web.config under <system.net><mailSettings>:
| Setting | Current Value |
|---|---|
| SMTP Host | smtp.bulkmail-za.com |
| Port | 25 |
| Username | conpro_bulkmail@smtp.bulkmail-za.com |
| From address | no-reply@conprosoft.co.za |
| Delivery method | Network |
To update: edit the <network> element in web.config. No application restart is required on IIS — the application picks up SMTP settings on the next request after the configuration file is saved. In provider-managed shared hosting with multiple worker processes, allow a few minutes for all workers to reload the configuration before sending a test email.
How Email Rules Work¶
Email sending is implemented entirely within the controller XML files (/app/controllers/*.xml). Each email rule is a <rule type="Email"> block that contains:
- Header lines —
From:,To:,CC:,Subject:— supporting field placeholders in{FieldName}format. - HTML body — a full HTML email template with field placeholders.
- Trigger:
commandName="Insert",commandName="Update", or both. - Phase:
phase="After"— the email is sent after the database action succeeds.
Field placeholders (e.g. {PersonName}, {SupervisorEmailAddress}) are resolved at runtime from the record being saved. The special placeholder {@BusinessRules_UserEmail} resolves to the email address of the currently logged-in user.
Email Rules by Module¶
Human Resources¶
LeaveApplication — New Application
- Trigger: After Insert
- To:
no-reply@conprosoft.co.za; supervisor of the applicant - CC: logged-in user
- Subject:
{Status}: {LeaveType} Request for {PersonName} ({StartDate} - {EndDate} [{NumberOfDays} day(s)]) - Body: leave request details table
LeaveApplication — Status Update
- Trigger: After Update
- To:
no-reply@conprosoft.co.za; employee; supervisor - CC: logged-in user
- Subject: same format as above
- Body: leave request details including approval status and approver
TimeSheetHeader — New Timesheet
- Trigger: After Insert or Update
- To:
admin@conprosoft.co.za; supervisor - CC: employee
- Subject:
New Time Transaction: {PersonName} (Week: {TimesheetStartDate} through {Date07})
TimeSheetHeader — Timesheet Status Update
- Trigger: After Update
- To:
admin@conprosoft.co.za; employee - CC: supervisor
- Subject:
Time Transaction {Status}
Procurement¶
Requisition — Request Approval
- Trigger: After Update (when approval is requested)
- To:
{SupervisorEmailAddress};finance@bmhafrica.co.za - CC:
{RequestorEmailAddress};no-reply@conprosoft.co.za - Subject:
Approval Requested - {RequisitionNumber}
Requisition — Approved/Status Update
- Trigger: After Update
- To:
{RequestorEmailAddress};finance@bmhafrica.co.za - CC:
{SupervisorEmailAddress};no-reply@conprosoft.co.za - Subject:
{RequisitionNumber}: {RequisitionStatus}
PurchaseOrders — Issue PO to Supplier
- Trigger: After Update (action
sendEmail_PO) - To:
{SupplierEmail};finance@bmhafrica.co.za - CC:
{RequestorEmailAddress};{ApprovedByPersonEmailAddress};no-reply@conprosoft.co.za - Subject:
PURCHASE ORDER {PurchaseOrderNumber} - Body: full PO details
PurchaseOrders — Request Revision Approval
- Trigger: After Update (action
sendEmail_RequestApproval) - To:
{ApprovedByPersonEmailAddress};finance@bmhafrica.co.za - CC:
{RequestorEmailAddress};no-reply@conprosoft.co.za - Subject:
Revision Approval Requested: {PurchaseOrderNumber} (Rev {RevisionNumber})
PurchaseOrders — Revision Approved
- Trigger: After Update (action
sendEmail_Approved) - To:
{ApprovedByPersonEmailAddress};finance@bmhafrica.co.za - CC:
{RequestorEmailAddress};no-reply@conprosoft.co.za - Subject:
Revision Approval: {PurchaseOrderNumber} (Rev {RevisionNumber})
Payments — Payment Notification
- Trigger: After Insert
- To:
{PurchaseOrderSupplierEmail};finance@bmhafrica.co.za - CC:
{RequestorEmailAddress};{IssuedByPersonEmailAddress};no-reply@bmh-crp.co.za - Subject:
PAYMENT NOTIFICATION: {PurchaseOrderNumber}
Task Manager¶
Task — New Task
- Trigger: After Insert
- To:
{TaskOwnerEmailAddress};{TaskAssignmentEmailAddress};{SupplierEmail};no-reply@bmh-crp.co.za - CC: up to 5 participant email addresses; assignment supervisor
- Subject:
New Task "{TaskName}" due on {DueDate}
SubTask — New Activity
- Trigger: After Insert
- To:
no-reply@bmh-crp.co.za;{ActivityOwnerEmailAddress};{ActivityAssignmentEmailAddress};{SupplierEmail} - CC: up to 5 participant email addresses
- Subject:
New Activity "{TaskName}" created for Task {TaskName1} due on {TaskDueDate}
Issue Register¶
IssueRegister — New Issue
- Trigger: After Insert
- To:
{IssueLoggedByUserEmail};{IssueAssignedToUserEmail};no-reply@bmh-crp.co.za - Subject:
New Issue Lodged: N: {IssueNumber}, T: {IssueType}
IssueRegister — Issue Updated
- Trigger: After Update
- To:
{IssueLoggedByUserEmail};{IssueAssignedToUserEmail};no-reply@bmh-crp.co.za - Subject:
Issue Updated: N: {IssueNumber}: T: {IssueType} - S: {Status}
IssueResponse — New Response
- Trigger: After Insert
- To:
{IssueLoggedByUserEmail};{IssueAssignedToUserEmail};no-reply@bmh-crp.co.za - Subject:
New Response on Issue Nr: {IssueNumber}, Type: {IssueType}, Status: {IssueStatus}
IssueResponse — Response Updated
- Trigger: After Update
- Same recipients as above.
Updating Email Configuration¶
Changing the SMTP Server¶
Edit web.config — update host, port, userName, password, and from under <system.net><mailSettings>.
Changing Hardcoded Recipient Addresses¶
The following addresses are embedded in controller XML files. To change them, open the relevant XML in /app/controllers/ and update the To: or CC: header line inside the <rule type="Email"> block:
| Address | File to Edit |
|---|---|
finance@bmhafrica.co.za |
PurchaseOrders.xml, Requisition.xml, Payments.xml |
admin@bmh-crp.co.za |
TimeSheet.xml |
admin@conprosoft.co.za |
TimeSheetHeader.xml |
no-reply@conprosoft.co.za |
Various controllers |
no-reply@bmh-crp.co.za |
Task.xml, SubTask.xml, IssueRegister.xml, IssueResponse.xml, Payments.xml |
Changing the From Address¶
The from attribute in web.config sets the default From address for all emails. Individual rules may override this in their From: header line inside the XML. Both locations may need updating if the sending domain changes.
SMTP Configuration¶
SMTP is configured in web.config:
- From Address – configured in
<smtp from="...">. - Host, Port, Credentials – configured in the
<network>element.
These must be updated to point to the client’s chosen SMTP provider. Avoid storing cleartext production credentials in source; use secure configuration practices where possible.
Email Business Rules¶
Email sending is handled through:
- Action definitions in controller XML files (
/app/controllers). - Application service methods in
App_Code/Servicesand custom rules inApp_Code/custom/Ruleswhere implemented.
Typical scenarios:
- Notifications when certain records are created or status changes.
- Membership-related emails (user registration, approval, password reset).
The detailed routing (who receives which email) is defined in the controller configuration and/or custom rule logic, and may vary per deployment.
Recommended Changes per Environment¶
For each environment (Dev / Test / Prod):
- Update SMTP host, port, username, and password in
web.config. - Confirm the
fromaddress uses a domain verified with the SMTP provider. - Where necessary, configure different recipients (e.g. test distribution lists vs. production contacts).
Any changes to email-related business rules should be documented here, including:
- Which controllers send emails
- Under which conditions (status changes, new record, scheduled jobs)
- Who the recipients are and how they are determined (fixed, role-based, or record-based)