Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
emailapi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
andrewcormickdockery
emailapi
Commits
44cdb746
Commit
44cdb746
authored
Feb 13, 2020
by
mattwire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify variable name
parent
5bce59b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
api/v3/Email/Send.php
api/v3/Email/Send.php
+5
-5
No files found.
api/v3/Email/Send.php
View file @
44cdb746
...
...
@@ -147,7 +147,7 @@ function civicrm_api3_email_send($params) {
*
*/
$toName
=
''
;
$
e
mail
=
$alternativeEmailAddress
;
$
toE
mail
=
$alternativeEmailAddress
;
}
elseif
(
$contact
[
'do_not_email'
]
||
empty
(
$contact
[
'email'
])
||
CRM_Utils_Array
::
value
(
'is_deceased'
,
$contact
)
||
$contact
[
'on_hold'
])
{
/**
* Contact is decaused or has opted out from mailings so do not send the e-mail
...
...
@@ -157,7 +157,7 @@ function civicrm_api3_email_send($params) {
/**
* Send e-mail to the contact
*/
$
e
mail
=
$contact
[
'email'
];
$
toE
mail
=
$contact
[
'email'
];
$toName
=
$contact
[
'display_name'
];
}
...
...
@@ -213,7 +213,7 @@ function civicrm_api3_email_send($params) {
'groupName'
=>
'E-mail from API'
,
'from'
=>
$from
,
'toName'
=>
$toName
,
'toEmail'
=>
$
e
mail
,
'toEmail'
=>
$
toE
mail
,
'subject'
=>
$messageSubject
,
'messageTemplateID'
=>
$messageTemplates
->
id
,
];
...
...
@@ -233,7 +233,7 @@ function civicrm_api3_email_send($params) {
}
$result
=
CRM_Utils_Mail
::
send
(
$mailParams
);
if
(
!
$result
)
{
throw
new
API_Exception
(
'Error sending e-mail to '
.
$contact
[
'display_name'
]
.
' <'
.
$
e
mail
.
'> '
);
throw
new
API_Exception
(
'Error sending e-mail to '
.
$contact
[
'display_name'
]
.
' <'
.
$
toE
mail
.
'> '
);
}
//create activity for sending e-mail.
...
...
@@ -278,7 +278,7 @@ function civicrm_api3_email_send($params) {
$returnValues
[
$contactId
]
=
[
'contact_id'
=>
$contactId
,
'send'
=>
1
,
'status_msg'
=>
"Successfully sen
d e-mail to
{
$e
mail
}
"
,
'status_msg'
=>
"Successfully sen
t e-mail to
{
$toE
mail
}
"
,
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment