• Charlie Cox 1
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
I am trying to send emails from my apex class in my developer edition of salesforce. Here is the apex code:

    public void sendEmail(Contact con) {
        try {            
            Messaging.reserveSingleEmailCapacity(1); // Reserve email message from capacity
            
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); // Instantiate new email message
            
            mail.setToAddresses(new String[]{con.Email}); // Set to address to contact's email
            mail.setUseSignature(false); // Don't use signature
            
            /* Set reply to and from address based on if this is a conference email or not */
                
                mail.setReplyTo('myEmail@yahoo.com');
                mail.setOrgWideEmailAddressId('0D2o0000000Ce18'); 
            
            /* Set subject/body if conference confirmation email */
                
                mail.setSubject('Test');
                mail.setHtmlBody('This worked');
                
            /* Set subject/body if companion confirmation email */
             
            
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); // Send email'
            System.debug('Sent the Email');
            
        /* Display error message if email send was not successful */
        } catch (DmlException e) {
            
            System.debug('The following exception has occurred: ' + e.getMessage());
        }
    }

The issue is that I never recieve the email. I checked the debug logs and they show this:


20:23:59.089 (89826472)|SYSTEM_METHOD_ENTRY|[65]|Messaging.sendEmail(List<Messaging.Email>) 20:23:59.098 (98211855)|EMAIL_QUEUE|[65]|replyTo: charliecox17@yahoo.com, subject: NUBS Conference Confirmation, bccSender: false, saveAsActivity: true, useSignature: false, toAddresses: [charliecox2306@gmail.com], htmlBody: This worked, 20:23:59.098 (98263315)|SYSTEM_METHOD_EXIT|[65]|Messaging.sendEmail(List<Messaging.Email>) 20:23:59.098 (98283765)|SYSTEM_METHOD_ENTRY|[66]|System.debug(ANY) 20:23:59.098 (98300704)|USER_DEBUG|[66]|DEBUG|Sent the Email

Which makes me believe that the email is sending, I am just not recieving it. I have checked my spam folder and tried sending it to multiple emails with no luck. Also my access setting for deleverability is set to all email.

Thanks for any help!
 
I want a user to be able to select either Rice or Texas, Then in the next row be able to select Navy or Army. Basically I want a user to have 1 radio button per row.
User-added image
RIght now I am only able to select Navy or Army or Texas or Rice. (I can only pick 1 of the 4 instead of 1 of each 2.)

<apex:repeat var="a" value="{!picks}">
        <input type="radio" class="radio" name="x" value="{!a.homeTeamSelected}" id="y" />
        <label for="y">{!a.homeTeamName}</label>
        <input type="radio" class="radio" name="x" value="{!a.awayTeamSelected}" id="z" />
        <label for="z">{!a.awayTeamName}</label> <br/>  <hr/>  
    </apex:repeat>

Here is the section of my VF page. I have looked around and previous solutions have not worked for me so any new input would be great!

Thanks!
I want to develope a search which displays results in a list that generates as a user inputs a string into an inputText field. My code is below.

<apex:inputText value="{!companyName}" style="width:200px">
     <apex:actionSupport event="onchange" action="{!searchSort}" reRender="pbt2"/>
</apex:inputText>

<apex:outputPanel id="pbt2">
  <apex:outputPanel rendered="{!showSearchResults}">
       results go here
  </apex:outputPanel>
</apex:outputPanel>

The problem is that I inputText does not display "results goes here" as you type, but rather only when you click somewhere else isn't the input box.
Is there a way to make something render as soon as you type a character or no? Also if there is a better way to do this please feel free to let me know.
I am trying to send emails from my apex class in my developer edition of salesforce. Here is the apex code:

    public void sendEmail(Contact con) {
        try {            
            Messaging.reserveSingleEmailCapacity(1); // Reserve email message from capacity
            
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); // Instantiate new email message
            
            mail.setToAddresses(new String[]{con.Email}); // Set to address to contact's email
            mail.setUseSignature(false); // Don't use signature
            
            /* Set reply to and from address based on if this is a conference email or not */
                
                mail.setReplyTo('myEmail@yahoo.com');
                mail.setOrgWideEmailAddressId('0D2o0000000Ce18'); 
            
            /* Set subject/body if conference confirmation email */
                
                mail.setSubject('Test');
                mail.setHtmlBody('This worked');
                
            /* Set subject/body if companion confirmation email */
             
            
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); // Send email'
            System.debug('Sent the Email');
            
        /* Display error message if email send was not successful */
        } catch (DmlException e) {
            
            System.debug('The following exception has occurred: ' + e.getMessage());
        }
    }

The issue is that I never recieve the email. I checked the debug logs and they show this:


20:23:59.089 (89826472)|SYSTEM_METHOD_ENTRY|[65]|Messaging.sendEmail(List<Messaging.Email>) 20:23:59.098 (98211855)|EMAIL_QUEUE|[65]|replyTo: charliecox17@yahoo.com, subject: NUBS Conference Confirmation, bccSender: false, saveAsActivity: true, useSignature: false, toAddresses: [charliecox2306@gmail.com], htmlBody: This worked, 20:23:59.098 (98263315)|SYSTEM_METHOD_EXIT|[65]|Messaging.sendEmail(List<Messaging.Email>) 20:23:59.098 (98283765)|SYSTEM_METHOD_ENTRY|[66]|System.debug(ANY) 20:23:59.098 (98300704)|USER_DEBUG|[66]|DEBUG|Sent the Email

Which makes me believe that the email is sending, I am just not recieving it. I have checked my spam folder and tried sending it to multiple emails with no luck. Also my access setting for deleverability is set to all email.

Thanks for any help!