Answer the question
In order to leave comments, you need to log in
How to parse an email generated by a script?
Good afternoon!
On the site https://whatpub.com/pubs/WLD/16721/admiralty-london email is generated by a script when clicking on a link, mailto is not used. When clicked, it simply opens the default email client. How it is possible to parse mailboxes at such implementation?
Answer the question
In order to leave comments, you need to log in
if you are talking about
"Send an email to the Pub"
then it has the same link, i.e. the link can be picked up, how to pick it up already depends on the language, since there are different ones for different languages, but I'm sure you can handle it, for example, with a regular expression,
then after getting the value from href you can simply make a request, I can do it using curl, you can do this with the help of the PL in the context of which you ask the question, at the output I got the following
curl https://whatpub.com/email/pubs/WLD/16721/admiralty-london -v
< HTTP/1.1 302 Found
< Cache-Control: no-cache
< Cache-control: no-cache="set-cookie"
< Content-Type: text/html; charset=UTF-8
< Date: Wed, 23 May 2018 14:25:33 GMT
< Location: mailto:[email protected]?subject=Message from whatpub.com
< Server: nginx/1.10.3 (Ubuntu)
< Set-Cookie: XSRF-TOKEN=eyJpdiI6Ik55NksrQUNjZ0IrOEo2d0x0dXZFU0E9PSIsInZhbHVlIjoiWWNhM3owOUQ2NXI3RW9PNWxwVFRKVzl4WFlzOFQ1YVhKT1RuMnVTeHQwU2F4NzNrYzkyMnBQc3NiYzh5SzlRQ3BNdDhPWGhBbmJqY2Uwa1NlUEtLY2c9PSIsIm1hYyI6ImQ2M2YyZGUwMjZkOWQ5M2QwMmY4Njg3ZTg3ZGFmYzY5M2IwN2E5MzEzNmE5Mjk4YjZmYTBhZWYzMThkNjE3ZGYifQ%3D%3D; expires=Wed, 23-May-2018 16:25:33 GMT; Max-Age=7200; path=/
< Set-Cookie: laravel_session=eyJpdiI6ImFwbzZ5NWkwZDU3SEdWZUVrMkVzMlE9PSIsInZhbHVlIjoidU1mNXJaK011UlFFdCtXd0s3T0pickRCU3Zac2NDenR4M2JWTktpUFJtWFdGWUVvdmlWY29LZXBrYXgrVjBJcGw4SEJFR2xHdnk3bEFmblNIR3F5RkE9PSIsIm1hYyI6Ijc5OWMzYWY5OGJhOTVlMTg4MTQyMTdmODk0MTU1MTc0N2FjZDk4ZWM1OTRiMzcwZjI0YjU4MWFmOWMzZGQ5ODYifQ%3D%3D; path=/; HttpOnly
< Set-Cookie: AWSELB=01DD03530E67BFFC04B89C1AB1D725CF38FEFFFFB526A70FE6683D57BA12891CB04EB7AB8B044FF3DA7E868D235714949A89859BFF12F58076A3C9EEB7DE24264B41A9AF0C;PATH=/;MAX-AGE=3600
< Content-Length: 524
< Connection: keep-alive
<
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="1;url=mailto:[email protected]?subject=Message from whatpub.com" />
<title>Redirecting to mailto:[email protected]?subject=Message from whatpub.com</title>
</head>
<body>
Redirecting to <a href="mailto:[email protected]lers.co.uk?subject=Message from whatpub.com">mailto:[email protected]?subject=Message from whatpub.com</a>.
</body>
* Curl_http_done: called premature == 0
* Connection #0 to host whatpub.com left intact
</html>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question