Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [apex-email-service]

Email services are automated processes that use Apex classes to process the contents, headers, and attachments of inbound email.

0
votes
1answer
18 views

Email Services - Add setReplyTo email while sending email from record detail page of an object

I have created an email service and got an email address like email_handler@9w9wya19o...... I want to capture the email response of email that I am sending from the record detail page but I am unable ...
0
votes
1answer
17 views

Single Email limit per execution using Apex Trigger

How many emails will be send using trigger per execution?
0
votes
1answer
22 views

SendEmail failed. First exception on row 0; first error: INVALID_ID_FIELD, WhatId is not available for sending emails to UserIds.:

Error: SendEmail failed. First exception on row 0; first error: INVALID_ID_FIELD, WhatId is not available for sending emails to UserIds. I want to send email through the snippet in below. List < ...
0
votes
0answers
33 views

Apex Inbound email class for Lightning

We are currently moving to Field service lightning, we have Apex email services which uses Messaging.InboundEmailHandler instance to auto creates service cases from incoming emails from our customers....
0
votes
1answer
31 views

System.QueryException: List has no rows for assignment to SObject - Sandbox to Production in salesforce

I am new to Salesforce. I am creating an application where the user will email the JSON data to insert that data and attachment to the Lead Object using Email Services. It is working fine in Sandbox ...
2
votes
0answers
34 views

The target object email address is currently marked as bounced

I have activated bounce management in two dev orgs. I am sending emails to record owner through batch class. If email is not valid, DEV1 org is throwing a message Email address is invalid and DEV2 org ...
-1
votes
1answer
42 views

Data from My Server to Salesforce Leads

I am new to Salesforce, I have created a web application to collect pdf documents and other details like name, contact, email etc from the user. I want to push all the data including pdf files to ...
0
votes
0answers
22 views

How to test Email Services for outbound email in salesforce? [duplicate]

This is the first time I am developing Apex outbound mass email class. Could anyone help how to test the class? Here is my code: public class SendMassOutboundEmail { public static void MassOutbMail()...
1
vote
1answer
65 views

Email to Case (Using thread Id)

I am working on email to case. My requirement is whenever a user is sending mail from outside to salesforce generated email address, case should be created and reply back to user with case id in ...
0
votes
1answer
8 views

Record not creating from non existent contact - email to custom object

I have an email to custom object record creation working for contacts that exist in the system. However, if a contact doesn't exist I can't seem to figure out how to get the record to create with the ...
0
votes
0answers
28 views

How to capture reply in email service

I am working on email to case. Whenever i am sending mail to salesforce from outside, case record is created and in reply i am getting case id to that email from which i have sent email to saleforce. ...
0
votes
1answer
47 views

Receive reply in Email Service

I am new to Email Service concepts in salesforce. Please help me out. I am working in Email to Case. When someone send email from outside to salesforce then new case record should be created which ...
0
votes
0answers
48 views

Apex inbound email handler is not working when email is sent to Salesforce from Surface device

We have a requirement in which if a User sends an email to a particular email address( say Client@Email.com) then new custom object record needs to be created. To implement this, we created an Email ...
3
votes
1answer
124 views

Regex implementation in Salesforce: getting from known string to end of the line

I have an email service that parses an email and inserts or updates a set of fields. I have trawled through previous questions and can see that many regex posts are voted down for being not '...
0
votes
0answers
19 views

Save Email Conversion

I'm trying to use the Lightning Experience UI to send an Email from a Record Homepage via the Activity tab. That way the email that sends from this UI is saving (in a not surprisingly way) in the ...
0
votes
1answer
63 views

“Reply All” , “Reply” and “Forward” buttons not visible in the Send Email Activity on an Apex generated email

I have an Email Service with an Apex class that creates a new EmailMessage object associating the sender with a Contact in the system and the recipient as a User. The email shows up correctly with all ...
0
votes
0answers
25 views

Is it possible to schedule sending a VF Page via Email?

We have this requirement that says we need to schedule once a month the sending of a VF page that contains custom dashboard charts via email. So if we break this requirement down, we need to do the ...
-1
votes
1answer
27 views

Image dynamically added to all Salesforce apex emails

Any time I send an email from Apex using the messaging class, Salesforce is automatically adding an image to the bottom of the email. The image appears as a box with a red x in outlook. This looks bad ...
0
votes
1answer
28 views

how to compare emails with trigger in two objects

Good morning, I'm new to the apex trigger world and I have a problem. I need to create a trigger that compares me to the emails of leads and if it coincides with an email of "Candidato_wifi". Do not ...
0
votes
1answer
53 views

Finding correct 'To Address' on inbound emails

I have built an apex class (below) that creates a custom object 'Messages' each time an email is sent in via the email service. All works well except unfortunately the to address being saved is the ...
0
votes
1answer
26 views

Apex code mail is not sending

i have tried out with the following code - am getting an exception of daily allowance of mail send,but actually none of the mails are send.whats the issue in this code?? public static void ...
0
votes
1answer
46 views

System.StringException: Invalid id: a5bK0000000HSWA

I am trying to get the id of the record from email subject. This is the subject of my email and ID a5bK0000000HSWA Subject: ABSI for approval. ref: a5bK0000000HSWA Now I am getting the id using ...
3
votes
0answers
146 views

Email doesn't get sent even after changing the email address for error: The target object email address is currently marked as bounced

I am running into an issue when I want to send an email via apex. The problem happens occasionally only with some emails from some domains. The error in specific reports: Messaging.SendEmailError[...
0
votes
1answer
118 views

Testing Error System seems to not recognize test class

ERROR: Unable to run tests synchronously: [This class name's value is invalid: Opportunity_EmailServiceTest. Provide the name of an Apex class that has test methods.]. @isTest private class ...
1
vote
1answer
36 views

Scratch Org Capabilities with regard to EmailServiceFunction

When I create an EmailServiceFunction in the scratch org and pull down to my local project I don't see the EmailServiceFunction I created reflected anywhere in the meta-data. Is this a change that can ...
-1
votes
1answer
44 views

Unable to create cases through Apex InboundEmailhanlder

I'm trying to create cases through incoming email by using Apex Inbound Emailhandler. It worked very well for a sample class which pulls the contact id based on incoming email address and creates case....
0
votes
1answer
39 views

Remove Reply-To email address

I am working with the approval process. When the workflow send the email alert to the user. The mail contains the reply-to email adrress which is wrong. I want to remove that option OR set it to the ...
0
votes
1answer
79 views

How to set singleemailmessage with brandtemplate

I am trying to send out an email from apex by utilizing emailTemplates. I am also changing text dynamically in Apex, and passing that into the emailTemplate. I do receive the email correctly with all ...
0
votes
1answer
114 views

How to display letterhead Email Template using Apex

I am able to send an email from VF page, and am getting the emails with the proper text formatting, but I am not getting the letterhead associated to the email template that I am referencing. Is that ...
-1
votes
1answer
165 views

Parse email body using strings to create case and populate it's fields

Need a help with email services. I'm trying to create cases through emails by using InboundEmailHandler. Our customers have a predefined email format (please check the screenshot). Once the email is ...
1
vote
0answers
22 views

Capture Approval Email reply with Apex

In an Approval Process, with email approval activated, when an approver replied by email, is it possible to capture that email and do additional processing with Apex? What I want is to forward the ...
2
votes
1answer
87 views

How to process image URLs in Email Services?

I have written an inbound email service to created records based on custom object. This email service processes replies to the outbound email sent from Salesforce. The outbound email's template and ...
2
votes
1answer
108 views

What happens to Email Addresses in Email Service of Full Sandbox after sandbox is refreshed from production and how to retain them

We have 2 Email Services each having separate Email Addresses created in Full Copy Sandbox. As Email Addresses are to be manually created(and not deployable) we created Email Addresses for these 2 ...
2
votes
1answer
153 views

What does Messaging.InboundEmail.htmlBodyIsTruncated really mean?

The apex class Messaging.InboundEmail represents an email received by an Apex Email Service, which is handed to an implementation of the Messaging.InboundEmailHandler interface (provided by the ...
0
votes
1answer
18 views

trigger on email sent to third party email id from salesforce

Wanted to track emails sent from salesforce to any third party email ids and not the contacts or any internal user.
2
votes
0answers
140 views

Apex SendMail() method emails received when executed as anonymous but not from code

We have been struggling with this for a day now and the answers on the web have not been helpful, so I'll be explicit in describing our issue. We have implemented a wrapper method for SendMail() as ...
0
votes
1answer
122 views

Operation 'EmailToApexHandler' is not appearing in debug logs while verifying Email Service

Earlier, I have successfully performed the steps outlined in the answer of how-to-leverage-org-wide-email-address-within-an-email-service to verify the Email Service Address generated by Salesforce. ...
0
votes
0answers
71 views

sending a mail in apex with the mail appearing in the case chatter feed

Using our current configuration, if I send an email manually from the email section on my case, the email is tracked in my case feed. Now i want the same thing to happen, when i send the mail via ...
14
votes
1answer
489 views

How to use an Apex Email Service to store emails on a record EXACTLY as Salesforce does?

I have used the Lightning Experience UI to send an Email from a Record Homepage via Activity-Tab. This looks like this (bottom-right!): Now I want (vice versa) to store an incoming email received by ...
0
votes
2answers
44 views

How to prevent emails from failing when a bounce-back occurs

If an email is sent out by Salesforce to a dead email address in a batch of email addresses, the process should continue for remaining email addresses instead of terminating the process upon failure/...
1
vote
0answers
77 views

Cannot query on IsPrivateDraft field of EmailMessage

I have a field named IsPrivateDraft in EmailMessage, I want to use that field for updating the draft EmailMessage. I want to know the value of this field but cannot use it in query. On using the field ...
2
votes
1answer
254 views

How to leverage org-wide email address within an email service?

I'm leveraging 'Send an Email' button for a custom object(comm__c) which has a lookup to the case object. While sending the email the user sets the 'From email address' to a specific Organization-Wide ...
0
votes
1answer
23 views

How can I report on Salesforce's 'External Email limit' for my specific organization?

I was looking at the Governor Limits page: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm And I wanted to see if we can see how close our org comes to ...
1
vote
2answers
133 views

Inbound Email handler - Status being set as 'Sent' instead of 'New'

I have the following Email handler Class: global class InsertReplyEmail implements Messaging.InboundEmailHandler { global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email,...
0
votes
0answers
85 views

Remove on behalf of from emails

I am triggering emails from a piece of Apex Code. What is happening is that, it is showing me noreply@salesforce.com [mailto:noreply@salesforce.com] On Behalf Of Test User<test.user@domain.com> ...
0
votes
0answers
11 views

Email integration communities

Communities does not support salesforce for outlook and salesforce for Gmail I have a Scenario where a record(opportunity) along emailmessage record should get created when a customer send a email to ...
0
votes
0answers
138 views

Send automated notification after Bulk Data Load job is completed. Is that possible? ( like automation)

I’m trying to set up an automated monitoring on bulk data loads. We regularly load data into Salesforce using default Informatica powercenter ( another database). Results can be inspected in the ...
0
votes
1answer
219 views

Single Email Limit Exceeded Error [duplicate]

while am executing this code am getting this error as single email limit exceeded. An Apex error occurred: System.EmailException: SendEmail failed. First exception on row 0; first error: ...
0
votes
1answer
209 views

Create a Salesforce file from an email attachment

I am using the custom email service to receive an email with an attachment. I can create a custom object record and associate the email attachments with it. Since the direction is to move away from ...
0
votes
0answers
34 views

Need help parsing email body

I have an email service where clients can send me yes/no answers to questions I ask yet a lot of responses include narratives such as, "No, I do not like green eggs and ham," (and others). Rather ...