Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8359909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:18:03+00:00 2026-06-09T11:18:03+00:00

Is there any way to get the From email address via code in PHP

  • 0

Is there any way to get the From email address via code in PHP – the address which we are using to send the email from SugarCRM.

I have tried

$phpMailer = new SugarPHPMailer();
$phpMailer->setMailerForSystem();       
print_r($phpMailer->From);

but it displays only the default value i.e. root@localhost

if i configure the From as shown below

$phpMailer->From = "myemailaddress@server.com";
print_r($phpMailer->From);

it display myemailaddress@server.com but when i recieve the email in my Gmail account it is received from the default configured email address of the Sugar which in our case is something@gmail.com i am sorry for privacy reasons i cant display it here
enter image description here

If i further elaborates the received mail and check the Show Original option from the menu in Gmail (the Menu available on the right side next to the fancy arrow of Reply where the from email address is displayed in Gmail) it displays From as the defualt email address of Sugar configured by us and Return-Path: myemailaddress@server.com

Any idea how to get the default configured Email address for sending emails in the Sugar via code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:18:06+00:00Added an answer on June 9, 2026 at 11:18 am

    Try

    $administration  = new Administration();
    $administration->retrieveSettings();
    print_r($administration->settings);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to get a certain thumbnail generated by PHP from a
Is there is any way to get the select Random Records using query from
Is there any programmatic way to get email notification in my application from the
Is there any way i can send out about 3000+ emails from one php
Is there any built in way to get a users email address based on
As my question says, is there any possible way to send an email from
Is there any way to get the user's email id from my app automatically..
Is there any way to get RoleId without get directly from DB?, I know
Is there any way to get just a part from MySql cell and ignore
Is there any way to get time-related information in directions from the Google Maps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.