![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Change the Return-Path in PHP mail function
The reply and return path can be placed in the headers as shown below −
$headers = 'From: sample@example.com' . "\r
" . 'Reply-To: sample@example.com' . "\r
" . 'Return-Path: sample@example.com'
Otherwise, it can be passed as the fifth parameter to change the return path −
mail($to, $subject, $message, $headers, "-f email@wherever.com");
Here, 'email@wherever.com' has to be replaced with the user's respective email id.
Advertisements