我正在尝试发送一封电子邮件,其中部分来自变量和部分预设的消息。 当电子邮件被设置为文本或只是一个变量时,电子邮件就可以正常运行,但只要我尝试使用它们,它就永远不会到达。 我已经确认所有变量都是正确的,最后回复它们但它实际上从未实际到达我的邮箱。
代码可能不是最好的做事方式,因为我几年没有做太多编码,但是如果有人能告诉我为什么会这样,那么我们将不胜感激:
namespace std
{
template<>
struct hash<Node>
{
size_t operator()(const Node& k) const;
};
}
class Node : public std::bitset<BITS_COUNT> {
public:
Node(std::string s) : bitset<BITS_COUNT>(s) {}
void setGroup(std::unordered_set<Node>* newSet) { currentGroup = newSet; }
std::unordered_set<Node>* getCurrentSet() { return currentGroup; }
private:
std::unordered_set<Node>* currentGroup = nullptr;
};
namespace std
{
size_t hash<Node>::operator()(const Node& k) const
{
return k.hash();
}
}
答案 0 :(得分:0)
请将此代码放入
else
{
$to = $email; // Send email to our user
$subject = 'Sacred Arts Camp Enquiry'; // Give the email a subject
$message = ' your message';
$headers = 'From:www.yourwebsite.com' . "\r\n"; // Set from headers
mail($to, $subject, $message, $headers); // Send our email
}
请在线服务器试试。