Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Other Programming › PHP Programming › Need help

Need help

Posts 1–3 of 3 · Page 1 of 1
DA
dawid17
Need help
Code:
<?php

if (isset($_POST['submit'])) {
    $name = $_POST['name'];
    $email = $_POST['email'];
    $message = $_POST['message'];
    
    $mailTo = "MYMAIL@hotmail.com";
    $headers = "From: ".$email;
    $txt = "You have received an e-mail from ".$email.".\n\n".$name."\n\n".message;
    
    mail($mailTo, $name, $txt);
    header("Location: mailsend.php");
}


How can I make this email to appear on the top instead of my servers email address?
The $headers doesnt seem to work?

whenever I change the code to mail($mailTo, $name, $txt, $headers); I do not receive any email at all.
#1 · edited 7y ago · 7y ago
DE
Develon
Quote Originally Posted by dawid17 View Post
Code:
<?php

if (isset($_POST['submit'])) {
    $name = $_POST['name'];
    $email = $_POST['email'];
    $message = $_POST['message'];
    
    $mailTo = "MYMAIL@hotmail.com";
    $headers = "From: ".$email;
    $txt = "You have received an e-mail from ".$email.".\n\n".$name."\n\n".message;
    
    mail($mailTo, $name, $txt);
    header("Location: mailsend.php");
}


How can I make this email to appear on the top instead of my servers email address?
The $headers doesnt seem to work?

whenever I change the code to mail($mailTo, $name, $txt, $headers); I do not receive any email at all.
Mail does have a 5th parameter that you can add. I think you can force the mail from address, like I have done below. But, it possibly could be how your mail server is setup that is causing the issue. You can also pass an array to the 4th parameter btw.

Code:
<?php

if (isset($_POST['submit'])) {
    $name = $_POST['name'];
    $email = $_POST['email'];
    $message = $_POST['message'];
    
    $mailTo = "MYMAIL@hotmail.com";
    $headers = array(
        'From' => $email,
        'Reply-To' => $email
    );
    $params = "-f ".$email;
    $txt = "You have received an e-mail from ".$email.".\n\n".$name."\n\n".message;
    
    mail($mailTo, $name, $txt, $headers, $params);
    header("Location: mailsend.php");
}
#2 · 7y ago
Silent
[MPGH]Silent
Quote Originally Posted by Develon View Post
Mail does have a 5th parameter that you can add. I think you can force the mail from address, like I have done below. But, it possibly could be how your mail server is setup that is causing the issue. You can also pass an array to the 4th parameter btw.

Code:
<?php

if (isset($_POST['submit'])) {
    $name = $_POST['name'];
    $email = $_POST['email'];
    $message = $_POST['message'];
    
    $mailTo = "MYMAIL@hotmail.com";
    $headers = array(
        'From' => $email,
        'Reply-To' => $email
    );
    $params = "-f ".$email;
    $txt = "You have received an e-mail from ".$email.".\n\n".$name."\n\n".message;
    
    mail($mailTo, $name, $txt, $headers, $params);
    header("Location: mailsend.php");
}
This is a bad idea, and you will be marked as spam instantly. If you want to send an email from your gmail account, send email through googles SMTP server. I think I got a simple SMTP script somewhere on my HDD that i made ages ago.

here - https://pastebin.com/38WWSYv3

You may need to fix encoding stuff, but that shouldn't be hard.


- - - Updated - - -

nevermind that was my raw mail object parser...

use this - https://pastebin.com/6mPfQL8y
#3 · 7y ago
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

  • need help with moddingBy BayBee Alyn in Combat Arms Help
    0Last post 15y ago
  • Need help finding a Vindictus injectorBy VpChris in Vindictus Help
    2Last post 15y ago
  • I need help~~!!!!By c834606877 in Alliance of Valiant Arms (AVA) Help
    1Last post 15y ago
  • Need HelpBy shane11 in CrossFire Help
    49Last post 15y ago
  • need help with modBy .:MUS1CFR34K:. in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    4Last post 15y ago

Tags for this Thread

None